Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

RuntimeEnvironment.GetRuntimeInterfaceAsObject Method

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)

[ComVisibleAttribute(false)]
public static Object GetRuntimeInterfaceAsObject(
	Guid clsid,
	Guid riid
)

Parameters

clsid
Type: System.Guid

The identifier for the desired class.

riid
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.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

  • SecurityCriticalAttribute 

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

Show:
© 2015 Microsoft