AutomationInteropProvider.HostProviderFromHandle(IntPtr) 메서드

정의

지정된 창을 나타내는 UI 자동화 공급자를 반환합니다.Returns a UI Automation provider that represents the specified window.

public:
 static System::Windows::Automation::Provider::IRawElementProviderSimple ^ HostProviderFromHandle(IntPtr hwnd);
public static System.Windows.Automation.Provider.IRawElementProviderSimple HostProviderFromHandle (IntPtr hwnd);
static member HostProviderFromHandle : nativeint -> System.Windows.Automation.Provider.IRawElementProviderSimple
Public Shared Function HostProviderFromHandle (hwnd As IntPtr) As IRawElementProviderSimple

매개 변수

hwnd
IntPtr

창의 핸들입니다.The handle of the window.

반환

지정된 창에 대한 원시 요소 공급자입니다.The raw element provider for the specified window.

예제

/// <summary>
/// Gets the host provider.
/// </summary>
/// <remarks>
/// Fragment roots return their window providers; most others return null.
/// </remarks>
IRawElementProviderSimple IRawElementProviderSimple.HostRawElementProvider  
{
    get 
    {
        return AutomationInteropProvider.HostProviderFromHandle(myHandle);  
    }
}
''' <summary>
''' Gets the host provider.
''' </summary>
''' <remarks>
''' Fragment roots return their window providers; most others return null.
''' </remarks>
ReadOnly Property HostRawElementProvider() As IRawElementProviderSimple _
    Implements IRawElementProviderSimple.HostRawElementProvider

    Get
        Return AutomationInteropProvider.HostProviderFromHandle(myHandle)
    End Get
End Property

설명

이 메서드에서 반환 된 인터페이스를 다시 전달할 수 있습니다 UI 자동화UI Automation합니다.The interface returned by this method can only be passed back to UI 자동화UI Automation. 인터페이스에서 메서드를 호출 하려고 하면 예외가 발생 합니다.Attempting to call a method on the interface will raise an exception.

적용 대상