UiaLookupId

UiaLookupId function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation Component Object Model (COM) interfaces instead.
 

Gets the integer identifier that can be used in methods that require a PROPERTYID, PATTERNID, CONTROLTYPEID, TEXTATTRIBUTEID, or EVENTID.

Syntax


int UiaLookupId(
  _In_ AutomationIdentifierType type,
  _In_ GUID                     *pGuid
);

Parameters

type [in]

Type: AutomationIdentifierType

A value from the AutomationIdentifierType enumerated type that specifies the type of identifier to look up.

pGuid [in]

Type: GUID*

The address of the unique identifier of the property, pattern, control type, text attribute, or event.

Return value

Type: int

Returns an integer identifier.

Examples

The following example function declares and populates a structure that contains identifiers for two properties, a pattern, and a control type.


struct UiaIdentifiers
{
    PROPERTYID NameProperty;
    PROPERTYID ControlTypeProperty;
    PATTERNID  InvokePattern;
    CONTROLTYPEID ButtonControlType;
} UiaIds;

void Provider::InitIds()
{
    static bool inited = false;
    if (!inited)
    {
        inited = true;
        UiaIds.NameProperty = UiaLookupId(AutomationIdentifierType_Property, &Name_Property_GUID);
        UiaIds.ControlTypeProperty = UiaLookupId(AutomationIdentifierType_Property, &ControlType_Property_GUID);
        UiaIds.InvokePattern = UiaLookupId(AutomationIdentifierType_Pattern, &Invoke_Pattern_GUID);
        UiaIds.ButtonControlType = UiaLookupId(AutomationIdentifierType_ControlType, &Button_Control_GUID);
    }
}

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

UIAutomationCoreApi.h

Library

Uiautomationcore.lib

DLL

Uiautomationcore.dll

See also

Conceptual
Property Identifiers
GUIDs

 

 

Show:
© 2016 Microsoft