RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) Method

Definition

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

public:
 static System::Object ^ GetRuntimeInterfaceAsObject(Guid clsid, Guid riid);
public static object GetRuntimeInterfaceAsObject (Guid clsid, Guid riid);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
public static object GetRuntimeInterfaceAsObject (Guid clsid, Guid riid);
static member GetRuntimeInterfaceAsObject : Guid * Guid -> obj
Public Shared Function GetRuntimeInterfaceAsObject (clsid As Guid, riid As Guid) As Object

Parameters

clsid
Guid

The identifier for the desired class.

riid
Guid

The identifier for the desired interface.

Returns

An object that represents the specified unmanaged COM object.

Attributes

Exceptions

Remarks

GetRuntimeInterfaceAsObject is similar to the GetRuntimeInterfaceAsIntPtr method.

Applies to