Udostępnij za pośrednictwem


RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) Metoda

Definicja

Przestroga

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

Zwraca wystąpienie typu reprezentującego obiekt COM przez wskaźnik do interfejsu IUnknown .

public:
 static System::Object ^ GetRuntimeInterfaceAsObject(Guid clsid, Guid riid);
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}")]
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
[<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
[<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

Parametry

clsid
Guid

Identyfikator żądanej klasy.

riid
Guid

Identyfikator żądanego interfejsu.

Zwraca

Obiekt reprezentujący określony niezarządzany obiekt COM.

Atrybuty

Wyjątki

Tylko platformy .NET Core i .NET 5+: we wszystkich przypadkach.

Uwagi

GetRuntimeInterfaceAsObject metoda jest podobna GetRuntimeInterfaceAsIntPtr do metody .

Dotyczy