Export (0) Print
Expand All
MFC
TRY
Expand Minimize

AfxOleUnregisterTypeLib 

Call this function to remove the type library entry from the Windows registration database.


BOOL AFXAPI AfxOleUnregisterTypeLib(
   REFGUID tlID 
);

Parameters

tlID

The unique ID of the type library.

Nonzero if the type library was successfully unregistered; otherwise 0.

// Type library GUID, corresponds to the uuid attribute of the library
// section in the .odl file.
const GUID CDECL BASED_CODE _tlid =   { 0x9dbafcd2, 0x592f, 0x101b,
 { 0x85, 0xce, 0x0, 0x60, 0x8c, 0xec, 0x29, 0x7b } };

// Type library major version number, number on the left of decimal
// point, in version attribute of the library section in .odl file.
const WORD _wVerMajor = 1;

// Type library minor version number, number on the right of decimal
// point, in version attribute of the library section in .odl file.
const WORD _wVerMinor = 0;

STDAPI DllUnregisterServer(void)
{
   AFX_MANAGE_STATE(AfxGetStaticModuleState());

   // register typelib with locale neutral
   if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor, LOCALE_NEUTRAL))
      return ResultFromScode(SELFREG_E_TYPELIB);

   // register classes
   if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
      return ResultFromScode(SELFREG_E_CLASS);

   return S_OK;
}

Community Additions

ADD
Show:
© 2014 Microsoft