Поделиться через


ComWrappers.CreateObject Метод

Определение

Перегрузки

CreateObject(IntPtr, CreateObjectFlags)

Создает управляемый объект для объекта, на который указывает externalComObject, с учетом значений flags.

CreateObject(IntPtr, CreateObjectFlags, Object, CreatedWrapperFlags)

CreateObject(IntPtr, CreateObjectFlags)

Исходный код:
ComWrappers.cs
Исходный код:
ComWrappers.cs
Исходный код:
ComWrappers.cs
Исходный код:
ComWrappers.cs

Создает управляемый объект для объекта, на который указывает externalComObject, с учетом значений flags.

protected:
 abstract System::Object ^ CreateObject(IntPtr externalComObject, System::Runtime::InteropServices::CreateObjectFlags flags);
protected abstract object? CreateObject(IntPtr externalComObject, System.Runtime.InteropServices.CreateObjectFlags flags);
abstract member CreateObject : nativeint * System.Runtime.InteropServices.CreateObjectFlags -> obj
Protected MustOverride Function CreateObject (externalComObject As IntPtr, flags As CreateObjectFlags) As Object

Параметры

externalComObject
IntPtr

nativeint

Импортируемый объект для использования в среде выполнения .NET.

flags
CreateObjectFlags

Флаги, используемые для описания внешнего объекта.

Возвращаемое значение

Управляемый объект, связанный с предоставленным внешним COM-объектом.

Комментарии

Если объект не может быть создан и null возвращается, вызов GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags) вызовет исключение ArgumentNullException.

Применяется к

CreateObject(IntPtr, CreateObjectFlags, Object, CreatedWrapperFlags)

protected:
 virtual System::Object ^ CreateObject(IntPtr externalComObject, System::Runtime::InteropServices::CreateObjectFlags flags, System::Object ^ userState, [Runtime::InteropServices::Out] System::Runtime::InteropServices::CreatedWrapperFlags % wrapperFlags);
protected virtual object? CreateObject(IntPtr externalComObject, System.Runtime.InteropServices.CreateObjectFlags flags, object? userState, out System.Runtime.InteropServices.CreatedWrapperFlags wrapperFlags);
abstract member CreateObject : nativeint * System.Runtime.InteropServices.CreateObjectFlags * obj * CreatedWrapperFlags -> obj
override this.CreateObject : nativeint * System.Runtime.InteropServices.CreateObjectFlags * obj * CreatedWrapperFlags -> obj
Protected Overridable Function CreateObject (externalComObject As IntPtr, flags As CreateObjectFlags, userState As Object, ByRef wrapperFlags As CreatedWrapperFlags) As Object

Параметры

externalComObject
IntPtr

nativeint

userState
Object
wrapperFlags
CreatedWrapperFlags

Возвращаемое значение

Применяется к