ILocalRegistry5.CreateAggregatedManagedInstance 方法

定义

创建托管类的实例并返回所请求的接口。

public:
 int CreateAggregatedManagedInstance(System::String ^ codeBase, System::String ^ AssemblyName, System::String ^ TypeName, IntPtr pUnkOuter, Guid % riid, [Runtime::InteropServices::Out] IntPtr % ppvObj);
public int CreateAggregatedManagedInstance (string codeBase, string AssemblyName, string TypeName, IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObj);
abstract member CreateAggregatedManagedInstance : string * string * string * nativeint * Guid * nativeint -> int
Public Function CreateAggregatedManagedInstance (codeBase As String, AssemblyName As String, TypeName As String, pUnkOuter As IntPtr, ByRef riid As Guid, ByRef ppvObj As IntPtr) As Integer

参数

codeBase
String

中程序集的位置。 null如果不使用 URL,则使用。 有关详细信息,请参阅 CodeBase

AssemblyName
String

中程序集的简单的、未加密的名称。

TypeName
String

中要创建的类型的名称。

pUnkOuter
IntPtr

nativeint

中一个指针,指向要使用所请求的接口进行聚合的外部对象。

riid
Guid

中用于与对象通信的接口,例如 IID_IClassFactory。

ppvObj
IntPtr

nativeint

弄指向在中请求的接口的指针 riid 。 成功返回时, ppvObj 包含请求的接口指针。 失败时,将 ppvObj 包含 null

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

适用于