COM Namespace Reference

The COM Library namespace. More...


Classes

class  ClassFactory
 The singleton coclass factory. More...
class  IDispatchImpl
 The implementaion of IDispatch. More...
class  InprocServer
 The base class for In-prcoess (DLL based) servers. More...
class  ObjectBase
 The base class for all COM objects. More...
class  Server
 The mixin class used for the common (DLL/EXE) COM server behaviour. More...
class  ServerRegInfo
 The data class used to store the library registry details. More...
struct  ClassRegInfo
 The data class used to store the coclass registry details. More...

Typedefs

typedef WCL::IFacePtr< IClassFactory > IClassFactoryPtr
 The class factory smart-pointer type.
typedef WCL::IFacePtr< IUnknown > IUnknownPtr
 The IUnknown smart-pointer type.
typedef WCL::IFacePtr< ITypeLib > ITypeLibPtr
 The Type Library smart-pointer type.

Enumerations

enum  ServerType { INPROC_SERVER = 1, LOCAL_SERVER = 2 }
 COM server type. More...
enum  ThreadingModel {
  MAIN_THREAD_APT = 1, SINGLE_THREAD_APT = 2, FREE_THREAD_APT = 3, ANY_APARTMENT = 4,
  NEUTRAL_APARTMENT = 5
}
 COM threading model. More...

Functions

tstring FormatGUID (const GUID &rGUID)
 Format the GUID as a string in Registry format.
tstring LookupCLSID (const CLSID &rCLSID)
 Find the human readable name for the class ID.
tstring LookupIID (const IID &rIID)
 Find the human readable name for the interface ID.
bool SetComErrorInfo (const char *pszSource, const tchar *pszDescription)
 Set the COM ErrorInfo object for the thread.
void SetRegistryValue (const tstring &strSubKey, const tstring &strValue)
 Creates or updates the default value for a registry key under the HKCR tree.
void SetRegistryValue (const tstring &strSubKey, const tstring &strName, const tstring &strValue)
 Creates or updates a named value for a registry key under the HKCR tree.
void DeleteKey (const tstring &strSubKey)
 Deletes the key from under the HKCR tree.
const tchar * GetServerTypeKey (ServerType eType)
 Get the registry key name used for configuring the server type.
const tchar * GetThreadModelKey (ThreadingModel eModel)
 Get the registry key name used for configuring the threading model.
void RegisterCLSID (const ServerRegInfo &rSvrInfo, const CLSID &rCLSID, const tstring &strClass, const tstring &strVersion, ThreadingModel eModel)
 Register a CLSID.
void UnregisterCLSID (const ServerRegInfo &rSvrInfo, const CLSID &rCLSID, const tstring &strClass, const tstring &strVersion)
 Unregister a CLSID.
void RegisterTypeLib (const tstring &strFile)
 Register a type library.
void UnregisterTypeLib (const GUID &rLIBID, ushort nMajor, ushort nMinor)
 Unregister a type library.
void RegisterMonikerPrefix (const tstring &strPrefix, const tstring &strClass, const CLSID &rCLSID)
void UnregisterMonikerPrefix (const tstring &strPrefix)

Variables

const size_t MAX_GUID_CHARS = 38
 The maximum length of a string GUID.


Detailed Description

The COM Library namespace.

Typedef Documentation

typedef WCL::IFacePtr<IClassFactory> COM::IClassFactoryPtr

The class factory smart-pointer type.

typedef WCL::IFacePtr<IUnknown> COM::IUnknownPtr

The IUnknown smart-pointer type.

typedef WCL::IFacePtr<ITypeLib> COM::ITypeLibPtr

The Type Library smart-pointer type.


Enumeration Type Documentation

enum COM::ServerType

COM server type.

Enumerator:
INPROC_SERVER  In-process (DLL) based server (CLSCTX_INPROC_SERVER).
LOCAL_SERVER  Out-of-process (EXE) based server (CLSCTX_LOCAL_SERVER).

enum COM::ThreadingModel

COM threading model.

Enumerator:
MAIN_THREAD_APT  ThreadingModel=[not set].
SINGLE_THREAD_APT  ThreadingModel=Apartment.
FREE_THREAD_APT  ThreadingModel=Free.
ANY_APARTMENT  ThreadingModel=Both.
NEUTRAL_APARTMENT  ThreadingModel=Neutral.


Function Documentation

tstring COM::FormatGUID ( const GUID &  rGUID  ) 

Format the GUID as a string in Registry format.

tstring COM::LookupCLSID ( const CLSID &  rCLSID  ) 

Find the human readable name for the class ID.

tstring COM::LookupIID ( const IID &  rIID  ) 

Find the human readable name for the interface ID.

bool COM::SetComErrorInfo ( const char *  pszSource,
const tchar *  pszDescription 
)

Set the COM ErrorInfo object for the thread.

The return value indicates if the "throw" was succesful or not.

void COM::SetRegistryValue ( const tstring &  strSubKey,
const tstring &  strValue 
)

Creates or updates the default value for a registry key under the HKCR tree.

void COM::SetRegistryValue ( const tstring &  strSubKey,
const tstring &  strName,
const tstring &  strValue 
)

Creates or updates a named value for a registry key under the HKCR tree.

void COM::DeleteKey ( const tstring &  strSubKey  ) 

Deletes the key from under the HKCR tree.

const tchar* COM::GetServerTypeKey ( ServerType  eType  ) 

Get the registry key name used for configuring the server type.

const tchar* COM::GetThreadModelKey ( ThreadingModel  eModel  ) 

Get the registry key name used for configuring the threading model.

void COM::RegisterCLSID ( const ServerRegInfo &  rSvrInfo,
const CLSID &  rCLSID,
const tstring &  strClass,
const tstring &  strVersion,
ThreadingModel  eModel 
)

Register a CLSID.

void COM::UnregisterCLSID ( const ServerRegInfo &  rSvrInfo,
const CLSID &  rCLSID,
const tstring &  strClass,
const tstring &  strVersion 
)

Unregister a CLSID.

void COM::RegisterTypeLib ( const tstring &  strFile  ) 

Register a type library.

void COM::UnregisterTypeLib ( const GUID &  rLIBID,
ushort  nMajor,
ushort  nMinor 
)

Unregister a type library.

void COM::RegisterMonikerPrefix ( const tstring &  strPrefix,
const tstring &  strClass,
const CLSID &  rCLSID 
)

void COM::UnregisterMonikerPrefix ( const tstring &  strPrefix  ) 


Variable Documentation

const size_t COM::MAX_GUID_CHARS = 38

The maximum length of a string GUID.


Generated on Tue Jan 6 22:13:19 2009 for COM Library by  doxygen 1.5.2