How to declare an __stdcall function pointer

↘锁芯ラ 提交于 2019-11-27 17:09:04

问题


I tried this

typedef void (* __stdcall MessageHandler)(const Task*);

This compiles but gives me this warning (VS2003):

warning C4229: anachronism used : modifiers on data are ignored

I want to declare a pointer to a function with stdcall calling convention? What am I doing wrong?


回答1:


As MSDN says, the correct way to write this is

typedef void (__stdcall *MessageHandler)(const Task*);


来源:https://stackoverflow.com/questions/5298394/how-to-declare-an-stdcall-function-pointer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!