ITypeInfo.CreateInstance Method (Object, Guid, Object)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates a new instance of a type that describes a component class (coclass).

Namespace:   System.Runtime.InteropServices.ComTypes
Assembly:  mscorlib (in mscorlib.dll)

void CreateInstance(
	object pUnkOuter,
	[InAttribute] ref Guid riid,
	out object ppvObj


Type: System.Object

The object that acts as the controlling IUnknown.

Type: System.Guid

The IID of the interface that the caller uses to communicate with the resulting object.

Type: System.Object

When this method returns, contains a reference to the created object. This parameter is passed uninitialized.

For additional information about ITypeInfo::CreateInstance, see the MSDN Library.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top