Skip to content

Latest commit

 

History

History
99 lines (76 loc) · 3.37 KB

nf-uiautomationcoreapi-uiahostproviderfromhwnd.md

File metadata and controls

99 lines (76 loc) · 3.37 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:uiautomationcoreapi.UiaHostProviderFromHwnd
UiaHostProviderFromHwnd function (uiautomationcoreapi.h)
Gets the host provider for a window.
UiaHostProviderFromHwnd
UiaHostProviderFromHwnd function [Windows Accessibility]
uiauto.uiauto_UiaHostProviderFromHwndFunction
uiauto_UiaHostProviderFromHwndFunction
uiautomationcoreapi/UiaHostProviderFromHwnd
winauto.uiauto_UiaHostProviderFromHwndFunction
winauto\uiauto_UiaHostProviderFromHwndFunction.htm
WinAuto
8cc8a8d8-a4e0-477e-bf3b-2fd5df2b9db1
12/05/2018
UiaHostProviderFromHwnd, UiaHostProviderFromHwnd function [Windows Accessibility], uiauto.uiauto_UiaHostProviderFromHwndFunction, uiauto_UiaHostProviderFromHwndFunction, uiautomationcoreapi/UiaHostProviderFromHwnd, winauto.uiauto_UiaHostProviderFromHwndFunction
uiautomationcoreapi.h
Windows
Windows XP [desktop apps \| UWP apps]
Windows Server 2003 [desktop apps \| UWP apps]
Uiautomationcore.lib
Uiautomationcore.dll
Windows
19H1
UiaHostProviderFromHwnd
uiautomationcoreapi/UiaHostProviderFromHwnd
c++
APIRef
kbSyntax
DllExport
Uiautomationcore.dll
Ext-MS-Win-uiacore-l1-1-0.dll
Ext-MS-Win-UIaCore-l1-1-1.dll
Ext-MS-Win-UIaCore-l1-1-2.dll
Ext-MS-Win-UiaCore-L1-1-3.dll
UiaHostProviderFromHwnd

UiaHostProviderFromHwnd function

-description

Gets the host provider for a window.

-parameters

-param hwnd [in]

Type: HWND

The window containing the element served by the provider.

-param ppProvider [out]

Type: IRawElementProviderSimple**

The host provider for the window.

-returns

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

The object retrieved by this function is useful only for responding to calls to the IRawElementProviderSimple::get_HostRawElementProvider method. You cannot use the object to raise events, provide properties, and so on. If you need to raise events or provide properties, you must create a provider object that fully implements the IRawElementProviderSimple interface.

Examples

The following example returns the host provider for the window that hosts the control served by this provider.

HRESULT STDMETHODCALLTYPE Provider::get_HostRawElementProvider(IRawElementProviderSimple** pRetVal)
{
    return UiaHostProviderFromHwnd(controlHWnd, pRetVal); 
} 

-see-also

Functions for Providers