IAccessible::get_accChildCount method (oleacc.h)

The IAccessible::get_accChildCount method retrieves the number of children that belong to this object. All objects must support this property.

Syntax

HRESULT get_accChildCount(
  [out, retval] long *pcountChildren
);

Parameters

[out, retval] pcountChildren

Type: long*

Address of a variable that receives the number of children that belong to this object. The children are accessible objects or child elements. If the object has no children, this value is zero.

Return value

Type: HRESULT

If successful, returns S_OK.

If not successful, returns a standard COM error code. Servers return these values, but clients must always check output parameters to ensure that they contain valid values. For more information, see Checking IAccessible Return Values.

Remarks

The number of children in an object can change. An application tracks the changes to the child count by watching for EVENT_OBJECT_CREATE and EVENT_OBJECT_DESTROY events generated by this object.

Note to server developers:  If the object does not have any children, return S_OK and set pcountChildren to zero.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header oleacc.h
Library Oleacc.lib
DLL Oleacc.dll
Redistributable Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95

See also

AccessibleChildren

IAccessible

IAccessible::get_accChild

IAccessible::get_accParent