简体   繁体   English

如何声明__stdcall函数指针

[英]How to declare an __stdcall function pointer

I tried this 我试过这个

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

This compiles but gives me this warning (VS2003): 这编译但给了我这个警告(VS2003):

warning C4229: anachronism used : modifiers on data are ignored 警告C4229:使用的时间错误:忽略数据上的修饰符

I want to declare a pointer to a function with stdcall calling convention? 我想用stdcall调用约定声明一个指向函数的指针? What am I doing wrong? 我究竟做错了什么?

正如MSDN所说 ,写这个的正确方法是

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM