Jump to content

PFNCOMPARE

From EDM2
Revision as of 03:05, 3 May 2025 by Martini (talk | contribs) (Created page with "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 arg...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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;