PFNDACOMPARE callback function (dpa_dsa.h)

Defines the prototype for the compare function used by DSA_Sort.


PFNDACOMPARE Pfndacompare;

int Pfndacompare(
  [in, optional] void *p1,
  [in, optional] void *p2,
  [in]           LPARAM lParam


[in, optional] p1

Type: void*

A pointer to the first item in the comparison.

[in, optional] p2

Type: void*

A pointer to the second item in the comparison.

[in] lParam


Additional data passed to pfnCmp.

Return value

Type: int

The meaning of the return values depends on the function that uses this callback prototype. The return values for DSA_Sort are the following.

less than 0 If p1 should be sorted ahead of p2.
equal to 0 If p1 and p2 should be sorted together.
greater than 0 If p1 should be sorted after p2.


Alternate names for this callback are PFNDPACOMPARE and PFNDSACOMPARE.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header dpa_dsa.h