Freigeben über


RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) Methode

Definition

Achtung

RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.

Gibt eine Instanz eines Typs zurück, die ein COM-Objekt durch einen Zeiger auf die IUnknown Schnittstelle darstellt.

public:
 static System::Object ^ GetRuntimeInterfaceAsObject(Guid clsid, Guid riid);
[System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static 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);
[<System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member GetRuntimeInterfaceAsObject : Guid * Guid -> obj
static member GetRuntimeInterfaceAsObject : Guid * Guid -> obj
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Security.SecurityCritical>]
static member GetRuntimeInterfaceAsObject : Guid * Guid -> obj
Public Shared Function GetRuntimeInterfaceAsObject (clsid As Guid, riid As Guid) As Object

Parameter

clsid
Guid

Der Bezeichner für die gewünschte Klasse.

riid
Guid

Der Bezeichner für die gewünschte Schnittstelle.

Gibt zurück

Ein Objekt, das das angegebene nicht verwaltete COM-Objekt darstellt.

Attribute

Ausnahmen

Nur .NET Core und .NET 5+ : In allen Fällen.

Hinweise

GetRuntimeInterfaceAsObject ähnelt der GetRuntimeInterfaceAsIntPtr Methode.

Gilt für: