Compiler Error C2066

cast to function type is illegal

An object was cast to a function type, which is illegal.

In ANSI C, it is not legal to cast between a pointer to a function and a pointer to data.