Freigeben über


Package.CreateInstance(Guid, Guid, Type) Method

Definition

Create the specified COM object using Visual Studio's ILocalRegistry and cast it to the given managed type. If VS cannot create it, then fall back to Activator.CreateInstance. This allows managed classes to be registered in local to the particular VS version in HKLM\Software\Microsoft\VisualStudio\8.0\clsid.

public:
 System::Object ^ CreateInstance(Guid % clsid, Guid % iid, Type ^ type);
public object CreateInstance (ref Guid clsid, ref Guid iid, Type type);
member this.CreateInstance : Guid * Guid * Type -> obj
Public Function CreateInstance (ByRef clsid As Guid, ByRef iid As Guid, type As Type) As Object

Parameters

clsid
Guid

The CLSID of the object to create.

iid
Guid

The interface IID the object implements.

type
Type

The managed type of the object to return.

Returns

An instance of the created object.

Remarks

This method is safe to access from any thread.

Applies to