RuntimeEnvironment.GetRuntimeInterfaceAsObject Method (Guid, Guid)

.NET Framework (current version)
 
System_CAPS_noteNote

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

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)>]
static member GetRuntimeInterfaceAsObject : 
        clsid:Guid *
        riid:Guid -> 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: