Package.CreateInstance(Guid, Guid, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates the specified COM object using the Visual Studio's local registry CLSID object.
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
The CreateInstance method creates the specified object using the Visual Studio local registry CLSID object. After creation it is cast to the given type. If Visual Studio cannot create it for any reason, the package uses Activator.CreatInstance
. This allows managed classes to be registered in local to the particular Visual Studio version in HKLM\Software\Microsoft\VisualStudio\8.0\clsid.