RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) Methode

Definitie

Let op

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

Retourneert een exemplaar van een type dat een COM-object vertegenwoordigt door een aanwijzer naar de IUnknown bijbehorende interface.

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

Parameters

clsid
Guid

De id voor de gewenste klasse.

riid
Guid

De id voor de gewenste interface.

Retouren

Een object dat het opgegeven niet-beheerde COM-object vertegenwoordigt.

Kenmerken

Uitzonderingen

.NET Core en .NET 5+ alleen: in alle gevallen.

Opmerkingen

GetRuntimeInterfaceAsObject is vergelijkbaar met de GetRuntimeInterfaceAsIntPtr methode.

Van toepassing op