Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITypeInfo2::CreateInstance Method (Object^, Guid%, Object^%)

 

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] Guid% riid,
	[OutAttribute] Object^% ppvObj
)

Parameters

pUnkOuter
Type: System::Object^

An object that acts as the controlling IUnknown.

riid
Type: System::Guid%

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

ppvObj
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
Show:
© 2017 Microsoft