Jump to content

PFNCOMPARE

From EDM2

Pointer to a Details View comparison function.

Type

FNCOMPARE

C Declaration Method

typedef struct

Remarks

This function would be used if you wanted to sort on a non-standard data type or if you wanted to a custom sort.

In the header file, this is a two-part definition as shown below:

typedef LONG (EXPENTRY FNCOMPARE)(PVOID, PVOID);
typedef FNCOMPARE *PFNCOMPARE;

The first argument (PVOID) is a pointer to the Details View field value. The second argument (PVOID) is a pointer to the value it is to be compared with. The function returns a LONG value that must be one of the following:

  • CMP_EQUAL 0
  • CMP_GREATER 1
  • CMP_LESS 2

Example Code

typedef FNCOMPARE *PFNCOMPARE;