DPA_Search function (dpa_dsa.h)

[DPA_Search is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Finds an item in a dynamic pointer array (DPA).

Syntax

int DPA_Search(
  HDPA         hdpa,
  void         *pFind,
  int          iStart,
  PFNDACOMPARE pfnCompare,
  LPARAM       lParam,
  UINT         options
);

Parameters

hdpa

Type: HDPA

A handle to a DPA.

pFind

Type: void*

A pointer to search for.

iStart

Type: int

The index at which to start search.

pfnCompare

Type: PFNDPACOMPARE

A comparison function pointer. See PFNDPACOMPARE for the comparison function prototype.

lParam

Type: LPARAM

An additional parameter to be passed to pfnCmp.

options

Type: UINT

This parameter may be one or more of the following.

Value Meaning
DPAS_SORTED
Indicates that the DPA is sorted.
DPAS_INSERTBEFORE
This value is only valid in conjunction with DPAS_SORTED. If the item is not found, return the position where the item is expected to be found in the sorted DPA.
DPAS_INSERTAFTER
This value is only valid in conjunction with DPAS_SORTED. If the item is not found, return the position where the item is expected to be found in the sorted DPA.

Return value

Type: int

Returns the index where the item was found in the DPA or -1 if the item was not found.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header dpa_dsa.h
Library Comctl32.lib
DLL ComCtl32.dll
API set ext-ms-win-shell-comctl32-da-l1-1-0 (introduced in Windows 10, version 10.0.14393)