Επεξεργασία

Κοινή χρήση μέσω


ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags) Method

Definition

Gets the currently registered managed object or creates a new managed object and registers it.

public:
 System::Object ^ GetOrCreateObjectForComInstance(IntPtr externalComObject, System::Runtime::InteropServices::CreateObjectFlags flags);
public object GetOrCreateObjectForComInstance (IntPtr externalComObject, System.Runtime.InteropServices.CreateObjectFlags flags);
member this.GetOrCreateObjectForComInstance : nativeint * System.Runtime.InteropServices.CreateObjectFlags -> obj
Public Function GetOrCreateObjectForComInstance (externalComObject As IntPtr, flags As CreateObjectFlags) As Object

Parameters

externalComObject
IntPtr

nativeint

Object to import for usage into the .NET runtime.

flags
CreateObjectFlags

Flags used to describe the external object.

Returns

A managed object associated with the supplied external COM object.

Remarks

If a managed object was previously created for the specified externalComObject using this ComWrappers instance, the previously created object will be returned. If not, a new one will be created.

Applies to