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. |
|
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 |
|
|
|
|
|
|
Gets the host provider for a window.
Type: HWND
The window containing the element served by the provider.
Type: IRawElementProviderSimple**
The host provider for the window.
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
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);
}