Changed some types from void* to void(*)()

This removes the illegal conversion between object pointers and function pointers.
Introduced a typedef for clarity.

For Windows, conversion from PROC to void(*)() appears to need a cast.

This fix isn't and can't be backward compatible.