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 Core::IFacePtr< IClassFactory > IClassFactoryPtr
 The class factory smart-pointer type.
typedef Core::IFacePtr< IUnknown > IUnknownPtr
 The IUnknown smart-pointer type.
typedef Core::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

std::tstring FormatGUID (const GUID &rGUID)
 Format the GUID as a string in Registry format.
std::tstring LookupCLSID (const CLSID &rCLSID)
 Find the human readable name for the class ID.
std::tstring LookupIID (const IID &rIID)
 Find the human readable name for the interface ID.
bool SetComErrorInfo (const char *pszSource, const char *pszDescription)
 Set the COM ErrorInfo object for the thread.
void SetRegistryValue (const std::tstring &strSubKey, const std::tstring &strValue)
 Creates or updates the default value for a registry key under the HKCR tree.
void SetRegistryValue (const std::tstring &strSubKey, const std::tstring &strName, const std::tstring &strValue)
 Creates or updates a named value for a registry key under the HKCR tree.
void DeleteKey (const std::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 std::tstring &strClass, const std::tstring &strVersion, ThreadingModel eModel)
 Register a CLSID.
void UnregisterCLSID (const ServerRegInfo &rSvrInfo, const CLSID &rCLSID, const std::tstring &strClass, const std::tstring &strVersion)
 Unregister a CLSID.
void RegisterTypeLib (const std::tstring &strFile)
 Register a type library.
void UnregisterTypeLib (const GUID &rLIBID, ushort nMajor, ushort nMinor)
 Unregister a type library.
void RegisterMonikerPrefix (const std::tstring &strPrefix, const std::tstring &strClass, const CLSID &rCLSID)
void UnregisterMonikerPrefix (const std::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 Core::IFacePtr<IClassFactory> COM::IClassFactoryPtr

The class factory smart-pointer type.

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

The IUnknown smart-pointer type.

typedef Core::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

std::tstring COM::FormatGUID ( const GUID &  rGUID  ) 

Format the GUID as a string in Registry format.

std::tstring COM::LookupCLSID ( const CLSID &  rCLSID  ) 

Find the human readable name for the class ID.

std::tstring COM::LookupIID ( const IID &  rIID  ) 

Find the human readable name for the interface ID.

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

Set the COM ErrorInfo object for the thread.

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

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

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

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

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

void COM::DeleteKey ( const std::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 std::tstring &  strClass,
const std::tstring &  strVersion,
ThreadingModel  eModel 
)

Register a CLSID.

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

Unregister a CLSID.

void COM::RegisterTypeLib ( const std::tstring &  strFile  ) 

Register a type library.

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

Unregister a type library.

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

void COM::UnregisterMonikerPrefix ( const std::tstring &  strPrefix  ) 


Variable Documentation

const size_t COM::MAX_GUID_CHARS = 38

The maximum length of a string GUID.


Generated on Wed Feb 13 22:53:38 2008 for COM Library by  doxygen 1.5.2