#include "StdAfx.h"
#include ".\mysink.h"


STDMETHODIMP ComSupport::CMySink::Invoke( 
		/* [in] */ DISPID dispIdMember,
		/* [in] */ REFIID riid,
		/* [in] */ LCID lcid,
		/* [in] */ WORD wFlags,
		/* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
		/* [out] */ VARIANT __RPC_FAR *pVarResult,
		/* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
		/* [out] */ UINT __RPC_FAR *puArgErr)
{
	return m_pEventMgr->OnEvent(
		dispIdMember,
		riid,
		lcid,
		wFlags,
		pDispParams,
		pVarResult,
		pExcepInfo,
		puArgErr);
};


STDMETHODIMP ComSupport::CallThisForEveryQI(void* pv, REFIID, void** ppv, DWORD)
{
	CComQIPtr<IDispatch> sp(static_cast<IUnknown*>(pv));
    *ppv = sp.Detach();
    return S_OK; 
}
