The arguments to you function pointer need to match the arguments to the function you are loading into it.
If you function pointer is:
int (*compare)(void*,void*)
you function prototype has to be:
int FunctionName1(void *a, void *b);
int FunctionName2(void *c, void *d);