IUIAutomationRegistrar::RegisterPattern method

Registers a third-party control pattern.

Syntax

HRESULT RegisterPattern(
  const UIAutomationPatternInfo *pattern,
  PATTERNID                     *pPatternId,
  PROPERTYID                    *pPatternAvailablePropertyId,
  UINT                          propertyIdCount,
  PROPERTYID                    *pPropertyIds,
  UINT                          eventIdCount,
  EVENTID                       *pEventIds
);

Parameters

pattern

Type: UIAutomationPatternInfo*

A pointer to a structure that contains information about the control pattern to register.

pPatternId

Type: PATTERNID*

Receives the pattern identifier.

pPatternAvailablePropertyId

Type: PROPERTYID*

Receives the property identifier for the pattern. This value can be used with UI Automation client methods to determine whether the element supports the new pattern. This is equivalent to values such as UIA_IsInvokePatternAvailablePropertyId.

propertyIdCount

Type: UINT

The number of properties supported by the control pattern.

pPropertyIds

Type: PROPERTYID*

Receives an array of identifiers for properties supported by the pattern.

eventIdCount

Type: UINT

The number of events supported by the control pattern.

pEventIds

Type: EVENTID*

Receives an array of identifiers for events that are raised by the pattern.

Return Value

Type: HRESULT

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

Remarks

The pattern, property, and event IDs retrieved by this method can be used in IAccessibleEx implementations.

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

IUIAutomationRegistrar