Partager via


RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) Méthode

Définition

Attention

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

Retourne une instance d’un type qui représente un objet COM par un pointeur vers son interface 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

Paramètres

clsid
Guid

Identificateur de la classe souhaitée.

riid
Guid

Identificateur de l’interface souhaitée.

Retours

Objet qui représente l'objet COM non managé spécifié.

Attributs

Exceptions

.NET Core et .NET 5 (et versions ultérieures) uniquement : Dans tous les cas.

Remarques

GetRuntimeInterfaceAsObject est similaire à la GetRuntimeInterfaceAsIntPtr méthode .

S’applique à