ITypeInfo2.CreateInstance(Object, Guid, Object) 方法
定义
创建描述组件类 (coclass) 的类型的新实例。Creates a new instance of a type that describes a component class (coclass).
public:
void CreateInstance(System::Object ^ pUnkOuter, Guid % riid, [Runtime::InteropServices::Out] System::Object ^ % ppvObj);
public void CreateInstance (object pUnkOuter, ref Guid riid, out object ppvObj);
public void CreateInstance (object? pUnkOuter, ref Guid riid, out object ppvObj);
abstract member CreateInstance : obj * Guid * obj -> unit
Public Sub CreateInstance (pUnkOuter As Object, ByRef riid As Guid, ByRef ppvObj As Object)
参数
- pUnkOuter
- Object
作为控制 IUnknown 的对象。An object that acts as the controlling IUnknown.
- riid
- Guid
接口的 IID,调用方将使用该接口与结果对象进行通信。The IID of the interface that the caller uses to communicate with the resulting object.
- ppvObj
- Object
此方法返回时,包含对已创建对象的引用。When this method returns, contains a reference to the created object. 此参数未经初始化即被传递。This parameter is passed uninitialized.
实现
注解
有关详细信息,请参阅 ITypeInfo:: CreateInstance 方法。For more information, see ITypeInfo::CreateInstance method.