How do I pass or get parameter values to/from this function pointer:
typedef void(* CreateCursorBitmapProc )(uchar *bitmapBuffer, uint32 *width, uint32 *height, bool16 *hasAlpha)
bitmapBuffer, width, height, hasalpha are the out parameters.
How do I pass or get parameter values to/from this function pointer:
typedef void(* CreateCursorBitmapProc )(uchar *bitmapBuffer, uint32 *width, uint32 *height, bool16 *hasAlpha)
bitmapBuffer, width, height, hasalpha are the out parameters.
// Grab an instance from somewhere...
CreateCursorBitmapProc instance = ...;
// Declare output variables
// should be initialized to some buffer, probably
uchar *bitmapBuffer = new uchar[size_of_buffer];
uint32 width, height;
bool16 hasAlpha;
(*instance)(bitmapBuffer, &width, &height, &hasAlpha);