IUIAutomationPatternHandler::CreateClientWrapper method

Creates an object that enables a client application to interact with a custom control pattern.

Syntax

HRESULT CreateClientWrapper(
  IUIAutomationPatternInstance *pPatternInstance,
  IUnknown                     **pClientWrapper
);

Parameters

pPatternInstance

Type: IUIAutomationPatternInstance*

A pointer to the instance of the control pattern that will be used by the wrapper.

pClientWrapper

Type: IUnknown**

Receives a pointer to the wrapper object.

Return Value

Type: HRESULT

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

Remarks

The wrapper object exposes methods and properties of the control pattern. The implementation of the wrapper class passes these calls to Microsoft UI Automation by calling CallMethod and GetProperty.

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

IUIAutomationPatternHandler