COM Interfaces
The Component Object Model (COM) is a binary-interface standard for software components within an operating system. COM provides a way for objects created by different vendors and in different languages to interoperate.
IUnknown
The base interface for all COM objects. It provides methods for reference counting and querying for other interfaces.
Methods:
HRESULT QueryInterface( REFIID riid, [out] void **ppvObject ); ULONG AddRef(); ULONG Release();
IDispatch
An interface that enables late-bound access to the properties and methods of an object.
Methods:
HRESULT GetTypeInfoCount( [out] UINT *pctinfo ); HRESULT GetTypeInfo( UINT iTInfo, LCID lcid, [out] ITypeInfo **ppTInfo ); HRESULT GetIDsOfNames( REFIID riid, [in] LPOLESTR *rgszNames, [in] UINT cNames, LCID lcid, [out] DISPID *rgDispId ); HRESULT Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr );
IPersistFile
Interface used by COM objects to load and save their data to and from a file.
Methods:
HRESULT GetClassID( [out] CLSID *pClassID ); HRESULT IsDirty(); HRESULT Load( [in] LPCOLESTR pszFileName, [in] DWORD dwMode ); HRESULT Save( [in] LPCOLESTR pszFileName, [in] BOOL fRemember ); HRESULT SaveCompleted( [in] LPCOLESTR pszFileName ); HRESULT GetCurFile( [out] LPOLESTR *ppszFileName );
IPersistStream
Interface used by COM objects to load and save their data from a stream.
Methods:
HRESULT GetClassID( [out] CLSID *pClassID ); HRESULT IsDirty(); HRESULT Load( [in] IStream *pStm ); HRESULT Save( [in] IStream *pStm, [in] BOOL fClearDirty ); HRESULT GetSizeMax( [out] ULARGE_INTEGER *pcbSize );