IAccPropServices::SetPropServer

Servers use SetPropServer to specify a callback object to be used to annotate an arrary of properties for the accessible element. You can also specify whether the annotation is to be applied to this accessible element or to the element and its children. This method is used for server annotation.

If server developers know the HWND of the object they want to annotate, they can use IAccPropServices::SetHwndPropServer.

HRESULT SetPropServer (
const BYTE* pIDString,DWORDdwIDStringLen,const MSAAPROPID* paProps,intcProps,IAccPropServer* pServer,AnnoScopeannoScope);

Parameters

  • pIDString, dwIDStringLen
    [in] Identify the accessible element that is to be annotated.
  • paProps, cProps
    [in] Specify an array of properties that is to be handled by the specified callback object.
  • pServer
    [in] Specifies the callback object, which will be invoked when a client requests one of the overridden properties.
  • annoScope
    [in] May be ANNO_THIS, indicating that the annotation affects the indicated accessible element only; or ANNO_CONTAINER, indicating that it applies to the element and its immediate element children.

Return Values

If successful, returns S_OK.

Returns E_INVALIDARG if any of the properties in the paProps array are not supported properties, if the identity string is not valid, or if annoScope is not one of ANNO_THIS or ANNO_CONTAINER.

May return other error codes under exceptional error conditions such as low memory.

Remarks

See the support section for a list of supported properties and their expected types.

The annotation run time will use AddRef to increment the reference counter for the pServer callback object appropriately. The caller is free to Release it after calling this method. The annotation run time will automatically release the callback object after the accessible element being annotated is no longer being used.

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.