| Home | Table of Contents | Please view with Internet Explorer (version 5.00 or higher) and enable scripting. For reasons, see Browsing This Web Site. |
This function deletes an item from a DPA.
PVOID
DPA_Delete (
HDPA pdpa,
int index);
The pdpa argument provides a handle to the DPA.
The index argument provides the 0-based index of the item.
If successful, the function returns a pointer to the item, including to return NULL for an empty item. The function returns NULL for failure.
This function deletes the pointer described by the given index in the given DPA. All pointers above the deletion point are moved one position towards the start of the array.
The function fails trivially if the DPA handle is NULL, or if the index is negative or is not less than the current number of pointers in the array.
If the deletion leaves the pointer array more than one allocation unit smaller than the current capacity, the function reduces the capacity by one allocation unit and tries to give back the last allocation unit from the memory used for the pointer array.
A variation is known for an early implementation. Version 4.00 merely assumes that the DPA handle is not NULL.
The DPA_DeletePtr function is exported from COMCTL32.DLL as ordinal 336 in version 3.50 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.