AfxOleRegisterServerClass
This function allows you to register your server in the OLE system registry.
BOOL AFXAPI AfxOleRegisterServerClass( REFCLSID clsid, LPCTSTR lpszClassName, LPCTSTR lpszShortTypeName, LPCTSTR lpszLongTypeName, OLE_APPTYPE nAppType = OAT_SERVER, LPCTSTR* rglpszRegister = NULL, LPCTSTR* rglpszOverwrite = NULL );
Most applications can use COleTemplateServer::Register to register the application's document types. If your application's system-registry format does not fit the typical pattern, you can use AfxOleRegisterServerClass for more control.
The registry consists of a set of keys and values. The rglpszRegister and rglpszOverwrite arguments are arrays of pointers to strings, each consisting of a key and a value separated by a NULL character ('\0'). Each of these strings can have replaceable parameters whose places are marked by the character sequences %1 through %5.
The symbols are filled in as follows:
Symbol | Value |
|---|---|
%1 | Class ID, formatted as a string |
%2 | Class name |
%3 | Path to executable file |
%4 | Short type name |
%5 | Long type name |