ObjectCreationDelegate 委托

定义

创建 COM 对象。

public delegate IntPtr ObjectCreationDelegate(IntPtr aggregator);
public delegate IntPtr ObjectCreationDelegate(IntPtr aggregator);
[System.Runtime.InteropServices.ComVisible(true)]
public delegate IntPtr ObjectCreationDelegate(IntPtr aggregator);
type ObjectCreationDelegate = delegate of nativeint -> nativeint
[<System.Runtime.InteropServices.ComVisible(true)>]
type ObjectCreationDelegate = delegate of nativeint -> nativeint
Public Delegate Function ObjectCreationDelegate(aggregator As IntPtr) As IntPtr 

参数

aggregator
IntPtr

nativeint

指向托管对象的 IUnknown 接口的指针。

返回值

IntPtr

nativeint

表示 COM 对象的 IUnknown 接口的 IntPtr 对象。

属性

注解

调用此委托以创建 COM 对象,作为托管对象需要创建其非托管部分的新实例的替代方法 CoCreateInstance 。 托管 IUnknown 对象的接口作为参数传递,委托应返回 IUnknown 非托管对象的接口。 这两个接口都作为 类型 IntPtr 传递,以避免封送处理。

MulticastDelegate 的每个派生类Delegate都有一个构造函数和一个Invoke方法。

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。

适用于