DPA_GetPtr

This function retrieves an item from a DPA.

Declaration

PVOID
DPA_GetPtr (
    HDPA pdpa,
    int index);

Parameters

The pdpa argument provides a handle to the DPA.

The index argument provides the 0-based index of the desired item.

Return Value

If successful, the function returns a pointer to the desired item, including to return NULL for an empty item. The function returns NULL for failure.

Behaviour

This function retrieves the pointer that is stored under the given index in the given DPA. It fails 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.

Early Implementations

A variation is known for an early implementation. Version 4.00 merely assumes that the DPA handle is not NULL.

Availability

The DPA_GetPtr function is exported from COMCTL32.DLL as ordinal 332 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.