Registering OLE Controls

OLE controls, like other OLE server objects, can be accessed by other OLE-aware applications. This is achieved by registering the control's type library and class.

The following functions allow you to add and remove the control's class, property pages, and type library in the Windows registration database:

Registering OLE Controls


Adds the control's class to the registration database.


Adds a control property page to the registration database.


Adds the control's type library to the registration database.


Removes a control class or a property page class from the registration database.


Removes the control's type library from the registration database.

AfxOleRegisterTypeLib is typically called in a control DLL's implementation of DllRegisterServer. Similarly, AfxOleUnregisterTypeLib is called by DllUnregisterServer. AfxOleRegisterControlClass, AfxOleRegisterPropertyPageClass, and AfxOleUnregisterClass are typically called by the UpdateRegistry member function of a control's class factory or property page.

See Also


MFC Macros and Globals