ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags) Method
Definition
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.
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
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про