Compartilhar via


COleObjectFactory::UpdateRegistry

Registers all of the application's object factories with the OLE system registry.

void UpdateRegistry( 
   LPCTSTR lpszProgID = NULL  
); 
virtual BOOL UpdateRegistry( 
   BOOL bRegister  
);

Parameters

  • lpszProgID
    Pointer to a string containing the human-readable program identifier, such as "Excel.Document.5."

  • bRegister
    Determines whether the control class's object factory is to be registered.

Remarks

Brief discussions of the two forms for this function follow:

  • UpdateRegistry( lpszProgID )   Registers this object factory with the OLE system registry. This function is usually called by CWinApp::InitInstance when the application is launched.

  • UpdateRegistry( bRegister )   This form of the function is overridable. If bRegister is TRUE, this function registers the control class with the system registry. Otherwise, it unregisters the class.

    If you use MFC ActiveX ControlWizard to create your project, ControlWizard supplies an override to this pure virtual function.

Requirements

Header: afxdisp.h

See Also

Reference

COleObjectFactory Class

Hierarchy Chart

COleObjectFactory::Revoke

COleObjectFactory::Register

COleObjectFactory::UpdateRegistryAll

CWinApp::InitInstance