DPA_DeleteAllPtrs

This function empties a DPA.

Declaration

BOOL DPA_DeleteAllPtrs (HDPA pdpa);

Parameters

The pdpa argument provides a handle to the DPA.

Return Value

The function returns TRUE for success, else FALSE for failure.

Behaviour

The function fails if the given DPA handle is NULL. The function frees the heap allocation used for the pointer array, if any. Failure to free the allocation is failure for the function. Having freed the allocation, the function reinitialises the control structure. The result is effectively a newly created DPA except to retain the allocation unit and choice of heap.

Variations

Defence against a NULL pdpa argument begins in a build of version 4.0. Specifically, there is no defence in the version 4.0 from Windows 95, or in any earlier version, but there is in the version 4.0 for Internet Explorer 3.00 for Windows NT. (I have no copy of an Internet Explorer 3.00 for Windows 95. See the list of COMCTL32 versions found for this survey.)

Availability

The DPA_DeleteAllPtrs function is exported from COMCTL32.DLL as ordinal 337 in version 3.50 and higher. The implementation for version 6.10 and higher is built into a statically linked library and thence is also exported from the Internet Explorer module IERTUTIL.DLL as ordinal 77 in version 7.0 and higher.

This function was documented among the Settlement Program Interfaces in December 2002, but with Windows 2000 cited as the minimum operating system, despite many years of earlier availability.