Your problem is that the correct definition for those functions in terms of basic datatypes would be:
MgErr (*FunctionName)(void* *data);
This is a reference to a pointer, which makes all of the difference.
A little more clearly written as:
MgErr (*FunctionName)(void **data);