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)

<SecurityCriticalAttribute>
<ComVisibleAttribute(False)>
Public Shared Function GetRuntimeInterfaceAsObject (
	clsid As Guid,
	riid As Guid
) As Object

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.

SecurityCriticalAttribute

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