Share via


IUIAutomationRegistrar::RegisterPattern Method

Registers a third-party control pattern.

Syntax

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

Parameters

  • pattern
    [in] The address of a UIAutomationPatternInfo structure that contains information about the control pattern to register.
  • patternId
    [out] The address of a variable that receives the pattern identifier.
  • pPatternAvailablePropertyId
    [out] The address of a variable that 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
    [in] The number of properties supported by the control pattern.
  • pPropertyIds
    [out] The address of a buffer that receives an array of identifiers for properties supported by the pattern.
  • eventIdCount
    [in] The number of events supported by the control pattern.
  • pEventIds
    [out] The address of a buffer that receives an array of identifiers for events that are raised by the pattern.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

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

See Also

IUIAutomationRegistrar