COM Library
|
Common COM types and macros. More...
#include <WCL/IFacePtr.hpp>
#include <WCL/StrCvt.hpp>
#include <WCL/ComException.hpp>
#include <WCL/Win32Exception.hpp>
Namespaces | |
namespace | COM |
The COM Library namespace. | |
Defines | |
#define | COMCALL STDMETHODCALLTYPE |
The COM calling convention. | |
#define | COMAPI virtual HRESULT COMCALL |
The standard COM return type and calling convention,. | |
#define | IMPLEMENT_IUNKNOWN() |
Implements IUnknown and ISupportErrorInfo. | |
#define | DEFINE_INTERFACE_TABLE(primary_iface) |
Implements interface_cast to match and downcast to the rquired interface. | |
#define | IMPLEMENT_INTERFACE(iid, iface_name) |
Adds a match for an interface. | |
#define | END_INTERFACE_TABLE() |
End of CastInterfaceImpl implementation. | |
Enumerations | |
enum | COM::ServerType { COM::INPROC_SERVER = 1, COM::LOCAL_SERVER = 2 } |
COM server type. More... | |
enum | COM::ThreadingModel { COM::MAIN_THREAD_APT = 1, COM::SINGLE_THREAD_APT = 2, COM::FREE_THREAD_APT = 3, COM::ANY_APARTMENT = 4, COM::NEUTRAL_APARTMENT = 5 } |
COM threading model. More... |
Common COM types and macros.
#define IMPLEMENT_IUNKNOWN | ( | ) |
virtual ULONG COMCALL AddRef() \ { return AddRefImpl(); } \ virtual ULONG COMCALL Release() \ { return ReleaseImpl(); } \ virtual HRESULT COMCALL QueryInterface(const IID& rIID, void** ppInterface) \ { return QueryInterfaceImpl(rIID, ppInterface); } \ virtual HRESULT COMCALL InterfaceSupportsErrorInfo(const IID& rIID) \ { return InterfaceSupportsErrorInfoImpl(rIID); }
Implements IUnknown and ISupportErrorInfo.
#define DEFINE_INTERFACE_TABLE | ( | primary_iface | ) |
virtual void* interface_cast(const IID& rIID) \ { \ if (IsEqualIID(rIID, IID_IUnknown)) \ return static_cast<primary_iface*>(this); \ if (IsEqualIID(rIID, IID_ISupportErrorInfo)) \ return static_cast<ISupportErrorInfo*>(this);
Implements interface_cast to match and downcast to the rquired interface.
#define IMPLEMENT_INTERFACE | ( | iid, | |
iface_name | |||
) |
if (IsEqualIID(rIID, iid)) \ return static_cast<iface_name*>(this);
Adds a match for an interface.
#define END_INTERFACE_TABLE | ( | ) |
return nullptr; \ }
End of CastInterfaceImpl implementation.