IProxyProviderWinEventHandler::RespondToWinEvent method

Handles a WinEvent.

Syntax

HRESULT RespondToWinEvent(
  DWORD                      idWinEvent,
  HWND                       hwnd,
  LONG                       idObject,
  LONG                       idChild,
  IProxyProviderWinEventSink *pSink
);

Parameters

idWinEvent

Type: DWORD

The identifier of the incoming WinEvent. For a list of WinEvent IDs, see Event Constants.

hwnd

Type: HWND

The handle of the window for which the WinEvent was fired. This should also be the window for which the proxy was created.

idObject

Type: LONG

The object identifier (OBJID_*) of the accessible object associated with the event. For a list of object identifiers, see Object Identifiers.

idChild

Type: LONG

The child identifier of the element associated with the event, or CHILDID_SELF if the element is not a child.

pSink

Type: IProxyProviderWinEventSink*

A pointer to the IProxyProviderWinEventSink interface provided by the UI Automation core. Any event that the proxy needs to raise in response to the WinEvent being handled should be added to the sink.

Return Value

Type: HRESULT

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

Remarks

The provider should review the event data. If the provider needs to raise a UI Automation event in response, the data for that event should be added to the pSink event sink.

Requirements

   
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)

See Also

IProxyProviderWinEventHandler

IProxyProviderWinEventSink

Reference