Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies flags for the GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags) method.
This enumeration supports a bitwise combination of its member values.
public enum class CreateObjectFlags
[System.Flags]
public enum CreateObjectFlags
[<System.Flags>]
type CreateObjectFlags =
Public Enum CreateObjectFlags
Name | Value | Description |
---|---|---|
None | 0 | Flag used to indicate no flags set. |
TrackerObject | 1 | Indicates that the supplied external COM object implements the IReferenceTracker. |
UniqueInstance | 2 | Indicates to ignore internal caching and always create a unique instance. |
Aggregation | 4 | Defined when COM aggregation is involved (that is an inner instance supplied). |
Unwrap | 8 | Check if the supplied instance is actually a wrapper and if so return the underlying managed object rather than creating a new wrapper. This matches the built-in RCW semantics for COM interop. |
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in