Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AfxOleUnregisterTypeLib
TRY
Collapse the table of content
Expand the table of content

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.

Return Value

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

Example

// 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;
}

See Also

MFC Macros and Globals | AfxOleUnregisterClass | AfxOleRegisterTypeLib

Show:
© 2015 Microsoft