I am trying to make a source code to work
extern "C" {
typedef LRESULT (__stdcall *NRI_PM_CALLBACK)(WPARAM, LPARAM);
}
LRESULT OnPaymentManagerMessage(WPARAM wParam, LPARAM lParam)
{
int type = (wParam >> 4) & 0x0F;
int device = wParam & 0x0F;
//cstr.Format("** Msg **[ %d %d %d ]", type, device, lParam);
//handle message here
return lParam;
}
NRI_PM_CALLBACK callback = &OnPaymentManagerMessage; //error on this line
Error:a value of type "LRESULT (*)(WPARAM wParam, LPARAM lParam)" cannot be used to initialized an entity of type "NRI_PM_CALLBACK"
I am running this in Visual Studio Express 2012
Any ideas why ?
Thanks