Article ID: 127074
Article Last Modified on 8/16/2005
STDAPI DllRegisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
All OLE controls implement a self-registration feature by exporting two
functions, DllRegisterServer and DllUnregisterServer. These functions are
called directly from outside of the control, so AFX_MANAGE_STATE must be
invoked at the beginning of each function.Additional query words: CDKiss kbOLE
Keywords: kbcode KB127074