The pfnCompare parameter must be declared as:

SHORT EXPENTRY pfnCompare(
      PRECORDCORE p1,
      PRECORDCORE p2,
      PVOID pStorage);

Note: If the CCS_MINIRECORDCORE style bit is specified when a container is created, then MINIRECORDCORE should be used instead of RECORDCORE and PMINIRECORDCORE should be used instead of PRECORDCORE in all applicable data structures and messages.