Export (0) Print
Expand All
Expand Minimize

IUIAutomationElement::GetCachedPatternAs method

Retrieves the control pattern interface of the specified pattern from the cache of this UI Automation element.

Syntax


HRESULT GetCachedPatternAs(
  [in]   PATTERNID patternId,
  [in]   REFIID riid,
  [out]  void **ppv
);

Parameters

patternId [in]

Type: PATTERNID

The identifier of the control pattern. For a list of control pattern IDs, see Control Pattern Identifiers.

riid [in]

Type: REFIID

A reference to the IID of the interface to retrieve through ppv.

ppv [out]

Type: void**

Receives the interface pointer requested in riid.

Return value

Type: HRESULT

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

Remarks

It is recommended that you use the IID_PPV_ARGS macro, defined in Objbase.h, to package the riid and ppv parameters. This macro provides the correct IID based on the interface pointed to by the value in ppv, which eliminates the possibility of a coding error.

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 only]

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 only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

Reference
IUIAutomationElement
GetCachedPattern
GetCurrentPatternAs
Conceptual
UI Automation Control Patterns Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft