RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) 메서드

정의

주의

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

IUnknown 인터페이스에 대한 포인터를 사용하여 COM 개체를 나타내는 형식의 인스턴스를 반환합니다.

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

매개 변수

clsid
Guid

원하는 클래스의 식별자입니다.

riid
Guid

원하는 인터페이스의 식별자입니다.

반환

지정된 관리되지 않는 COM 개체를 나타내는 개체입니다.

특성

예외

.NET Core 및 .NET 5+ 전용: 모든 경우

설명

GetRuntimeInterfaceAsObject 는 메서드와 유사합니다 GetRuntimeInterfaceAsIntPtr .

적용 대상