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
Maklum balas
https://aka.ms/ContentUserFeedback.
Akan datang: Sepanjang 2024, kami akan menghentikan secara berperingkat Isu GitHub sebagai kaedah maklum balas untuk kandungan dan menggantikannya dengan sistem maklum balas baharu. Untuk mendapatkan maklumat lanjut lihat:Kirim dan lihat maklum balas untuk