45

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?

Armen Tsirunyan
  • 130,161
  • 59
  • 324
  • 434

1 Answers1

72

As MSDN says, the correct way to write this is

typedef void (__stdcall *MessageHandler)(const Task*);
Jon
  • 428,835
  • 81
  • 738
  • 806