Error 492 - Invalid SORT function

Invalid SORT function - ARRAY SORT of a custom array requires a custom user FUNCTION with a specific signature (2 BYREF parameters,   STDCALL calling conventions, etc.).  The function you supplied did not meet these requirements.