c++winapistdcall

__stdcall in function paramater


does anybody know if is possible to add __stdcall (CALLBACK) in function parameter like this?:

void Function(LRESULT CALLBACK (*f)(HWND, UINT, WPARAM, LPARAM));

It gives me following error:

a calling convention may not be followed by a nested declarator

Any solutions?

Thx in advance <3


Solution

  • Put the calling convention inside the parenthesis.

    void Function(LRESULT (CALLBACK *f)(HWND, UINT, WPARAM, LPARAM));