Fix __stdcall placement and function prototype