DPA_Search function

[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 WINAPI DPA_Search(
  HDPA pdpa,
  void *pFind,
  int iStart,
  PFNDPACOMPARE pfnCmp,
  LPARAM lParam,
  UINT options
);

Parameters

pdpa

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.

pfnCmp

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.

ValueMeaning
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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

Library

Comctl32.lib

DLL

ComCtl32.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft