다음을 통해 공유


OBJECT_ENTRY_NON_CREATEABLE

Object entry macros can be placed in the object map to provide support for the registration, initialization, and creation of a class.

Beginning with ATL 4.0, the OBJECT_ENTRY_NON_CREATEABLE macro is deprecated in favor of the OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO macro, which provides full support for registering component categories using ATL's category map.

All new code should use the new macro. Existing code that used the OBJECT_ENTRY_NON_CREATEABLE macro and ATL's component category registration macros for the same class should also be updated to use the new macro.

For backward compatibility, the OBJECT_ENTRY_NON_CREATEABLE macro remains in the ATL headers so existing code will continue to work. Documentation for the original macro is provided below:

OBJECT_ENTRY_NON_CREATEABLE( class )

Parameters

  • class
    [in] The class of the object to be registered and initialized.

Remarks

This macro allows you to specify that a class should be registered and initialized, but that instances of this class should not be externally creatable via standard COM functions such as CoCreateInstance. You can still create instances of such classes from within the same project using standard C++ techniques.

Requirements

Header: atlcom.h

See Also

Concepts

ATL Macros

OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO