Share via


PFNDPACOMPARE function pointer

Defines the prototype for the compare function used by DPA_Sort and DPA_Search.

Syntax

typedef int ( CALLBACK *PFNDPACOMPARE)(
  _In_opt_ void   *p1,
  _In_opt_ void   *p2,
  _In_     LPARAM lParam
);

Parameters

  • p1 [in, optional]
    Type: void*

    A pointer to the first item in the comparison.

  • p2 [in, optional]
    Type: void*

    A pointer to the second item in the comparison.

  • lParam [in]
    Type: 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 DPA_Sort are as follows.

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.

 

The return values for DPA_Search are as follows.

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

 

Remarks

As of Windows Vista, this function is merely an alias for PFNDACOMPARE.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

See also

PFNDPACOMPARECONST