Поделиться через


COleObjectFactory Class

Implements the OLE class factory, which creates OLE objects such as servers, automation objects, and documents.

class COleObjectFactory : public CCmdTarget

Members

Public Constructors

Name

Description

COleObjectFactory::COleObjectFactory

Constructs a COleObjectFactory object.

Public Methods

Name

Description

COleObjectFactory::GetClassID

Returns the OLE class ID of the objects this factory creates.

COleObjectFactory::IsLicenseValid

Determines if the license of the control is valid.

COleObjectFactory::IsRegistered

Indicates whether the object factory is registered with the OLE system DLLs.

COleObjectFactory::Register

Registers this object factory with the OLE system DLLs.

COleObjectFactory::RegisterAll

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

COleObjectFactory::Revoke

Revokes this object factory's registration with the OLE system DLLs.

COleObjectFactory::RevokeAll

Revokes an application's object factories' registrations with the OLE system DLLs.

COleObjectFactory::UnregisterAll

Unregisters all of an application's object factories.

COleObjectFactory::UpdateRegistry

Registers this object factory with the OLE system registry.

COleObjectFactory::UpdateRegistryAll

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

Protected Methods

Name

Description

COleObjectFactory::GetLicenseKey

Requests a unique key from the control's DLL.

COleObjectFactory::OnCreateObject

Called by the framework to create a new object of this factory's type.

COleObjectFactory::VerifyLicenseKey

Verifies that the key embedded in the control matches the key embedded in the container.

COleObjectFactory::VerifyUserLicense

Verifies that the control is licensed for design-time use.

Remarks

The COleObjectFactory class has member functions for performing the following functions:

  • Managing the registration of objects.

  • Updating the OLE system register, as well as the run-time registration that informs OLE that objects are running and ready to receive messages.

  • Enforcing licensing by limiting use of the control to licensed developers at design time and to licensed applications at run time.

  • Registering control object factories with the OLE system registry.

For more information about object creation, see the articles Data Objects and Data Sources (OLE) and Data Objects and Data Sources: Creation and Destruction. For more about registration, see the article Registration.

Inheritance Hierarchy

CObject

CCmdTarget

COleObjectFactory

Requirements

Header: afxdisp.h

See Also

Reference

CCmdTarget Class

Hierarchy Chart

COleTemplateServer Class