On C # it is necessary to connect DLL working with COM technology.
Connecting the COM-DLL and calling functions from it I wrote - documentation sea. But in one function, the DLL requires that a pointer to IDispatch be passed as a parameter. B in this index on IDispatch two standard COM interfaces were implemented: IMsgBox and IPlatformInfo
Can this be done in C #? If so, can we have a good example?
Update
Do not tell me: the interfaces I need are inherited from IUnknown . Do I also need to implement the IUnknown interface with its functions ( QueryInterface , AddRef ...)?
I need to get this interface:
MIDL_INTERFACE("55272A00-42CB-11CE-8135-00AA004BB851") IPropertyBag : public IUnknown { public: virtual /* [local] */ HRESULT STDMETHODCALLTYPE Read( /* [in] */ LPCOLESTR pszPropName, /* [out][in] */ VARIANT *pVar, /* [unique][in] */ IErrorLog *pErrorLog) = 0; virtual HRESULT STDMETHODCALLTYPE Write( /* [in] */ __RPC__in LPCOLESTR pszPropName, /* [in] */ __RPC__in VARIANT *pVar) = 0; };