Partager via


IMPLEMENT_OLECREATE_FLAGS

Either this macro or IMPLEMENT_OLECREATE must appear in the implementation file for any class that uses DECLARE_OLECREATE.

IMPLEMENT_OLECREATE_FLAGS(class_name, external_name, nFlags, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8 )

Parameters

  • class_name
    The actual name of the class.

  • external_name
    The object name exposed to other applications (enclosed in quotation marks).

  • nFlags
    Contains one or more of the following flags:

  • afxRegInsertable   Allows the control to appear in the Insert Object dialog box for OLE objects.

  • afxRegApartmentThreading   Sets the threading model in the registry to ThreadingModel=Apartment.

  • **afxRegFreeThreading   **Sets the threading model in the registry to ThreadingModel=Free.

    You can combine the two flags afxRegApartmentThreading and afxRegFreeThreading to set ThreadingModel=Both. See InprocServer32 in the Windows SDK for more information on threading model registration.

  • l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8
    Components of the class's CLSID.

Remarks

Notes

If you use IMPLEMENT_OLECREATE_FLAGS, you can specify which threading model your object supports by using the nFlags parameter. If you want to support only the single-treading model, use IMPLEMENT_OLECREATE.

The external name is the identifier exposed to other applications. Client applications use the external name to request an object of this class from an automation server.

The OLE class ID is a unique 128-bit identifier for the object. It consists of one long, two WORDs, and eight BYTEs, as represented by l, w1, w2, and b1 through b8 in the syntax description. The Application Wizard and code wizards create unique OLE class IDs for you as required.

Requirements

Header: afxdisp.h

See Also

Reference

DECLARE_OLECREATE

CLSID Key

Concepts

MFC Macros and Globals