ObjectCreationDelegate ObjectCreationDelegate ObjectCreationDelegate ObjectCreationDelegate Delegate

定义

创建 COM 对象。Creates a COM object.

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

参数

aggregator
IntPtr IntPtr IntPtr IntPtr

指向托管对象的 IUnknown 接口的指针。A pointer to the managed object's IUnknown interface.

返回值

System.IntPtr

表示 COM 对象的 IUnknown 接口的 IntPtr 对象。An IntPtr object that represents the IUnknown interface of the COM object.

继承
ObjectCreationDelegateObjectCreationDelegateObjectCreationDelegateObjectCreationDelegate
属性

注解

调用此委托创建 COM 对象作为一种替代方法CoCreateInstance托管的对象需要创建其非托管部分的新实例。This delegate is called to create a COM object as an alternative to CoCreateInstance when a managed object needs to create a new instance of its unmanaged portion. IUnknown作为参数传递的托管对象的接口和委托应返回IUnknown非托管对象的接口。The IUnknown interface of the managed object is passed as a parameter and the delegate should return the IUnknown interface of the unmanaged object. 这两个接口类型作为传递IntPtr以避免封送处理。Both interfaces are passed as type IntPtr to avoid marshaling.

每个派生的类DelegateMulticastDelegate具有一个构造函数和一个Invoke方法。Every derived class of Delegate and MulticastDelegate has a constructor and an Invoke method.

Extension Methods

GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate)

获取一个对象,表示指定的委托所表示的方法。Gets an object that represents the method represented by the specified delegate.

适用于