Share via


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
    [in] The address of the IUIAutomationPatternInstance interface representing the instance of the pattern that will be used by the wrapper.
  • pClientWrapper
    [out, retval] The address of a variable that receives a pointer to the wrapper object.

Return Value

Returns S_OK if successful, or an error value otherwise.

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 IUIAutomationPatternInstance::CallMethod and IUIAutomationPatternInstance::GetProperty.

See Also

IUIAutomationPatternHandler