Partager via


ILocalRegistry5.CreateAggregatedManagedInstance Method

Definition

Creates an instance of a managed class and returns a requested interface.

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

Parameters

codeBase
String

[in] The location of the assembly. Use null if you do not use a URL. For more information, see CodeBase.

AssemblyName
String

[in] The simple, unencrypted name of the assembly.

TypeName
String

[in] The name of the type to create.

pUnkOuter
IntPtr

nativeint

[in] A pointer to the outer object to aggregate with the requested interface.

riid
Guid

[in] The interface to use to communicate with the object, for example IID_IClassFactory.

ppvObj
IntPtr

nativeint

[out] A pointer to the interface that is requested in riid. On successful return, ppvObj contains the requested interface pointer. On failure, ppvObj contains null.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method is safe to access from any thread.

Applies to