IAccPropServer::GetPropValue

Servers implement this callback interface. This interface is passed to the annotation methods and is called back when a client requests the values of one of the properties being annotated.

HRESULT GetPropValue (
const BYTE* pIDString,DWORDdwIDStringLen,MSAAPROPIDidProp,VARIANT* pvarValue,BOOL* pfHasProp);

Parameters

  • pIDString, dwIDStringLen
    [in] Identity string that identifies the object for the request, and the length of the identity string.
  • idProp
    [in] GUID indicating the desired property.
  • pvarValue
    [out] Callee should set this to return the value of the overridden property. This is only valid if pfHasProp is TRUE. Callee must set this to VT_EMPTY if pfHasProp is set to FALSE.
  • pfHasProp
    [out] Indicates whether the callee is supplying a value for the requested property. Callee should set this to TRUE if it is returning an overriding property or to FALSE if it is not returning a property (in which case it should also set pvarValue to VT_EMPTY).

Return Values

Should always return S_OK, except under exceptional error conditions such as low memory. If the specified property is not overridden, then pfHasProp should be set to FALSE and pvarValue should be set to VT_EMPTY by the callee.

Remarks

If a single callback object is registered for annotating multiple accessible elements, the identity string can be used to determine which element this request refers to.

If the accessible element is HWND-based, IAccPropServices::DecomposeHwndIdentityString() can be used to extract the HWND/idObject/idChild from the identity string.

If the callback has a value to return for the specified property, it should return it in pvarValue and set pfHasProp to TRUE. Otherwise it should set pvarValue to VT_EMPTY and set pfHasProp to FALSE. In this latter case, the original IAccessible interface pointer will be used to obtain a value for this property.

Requirements

**  Windows NT/2000/XP/Server 2003:** Included in Windows XP and Windows Server 2003.
**  Windows 95/98/Me:** Unsupported.
**  Redistributable:** Requires Active Accessibility 2.0 RDK on Windows NT 4.0 SP6 and Windows 98.
**  Header:** Declared in Oleacc.h; include Initguid.h before including Oleacc.h.