GetRuntimeInterfaceAsObject Method
Collapse the table of content
Expand the table of content

RuntimeEnvironment.GetRuntimeInterfaceAsObject Method (Guid, Guid)

.NET Framework (current version)

Returns an instance of a type that represents a COM object by a pointer to its IUnknown interface.

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

Public Shared Function GetRuntimeInterfaceAsObject (
	clsid As Guid,
	riid As Guid
) As Object


Type: System.Guid

The identifier for the desired class.

Type: System.Guid

The identifier for the desired interface.

Return Value

Type: System.Object

An object that represents the specified unmanaged COM object.

GetRuntimeInterfaceAsObject is similar to the GetRuntimeInterfaceAsIntPtr method.


requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft