다음을 통해 공유


RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, Guid) 메서드

정의

주의

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

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

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

매개 변수

clsid
Guid

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

riid
Guid

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

반품

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

특성

예외

.NET Core 및 .NET 5+만: 모든 경우에.

설명

GetRuntimeInterfaceAsObject 는 메서드와 GetRuntimeInterfaceAsIntPtr 비슷합니다.

적용 대상