Hello Forum,
I have created a Progressbar within a CodeBlocks project. Now I want to move my prj to Pelles Compiler. The problem is that the third param of CreateTimerQueueTimer() is marked by PellesCC. The message is:
C:\Eigene Dateien\abcd\PellesCrk\main.c(54): warning #2168: Operands of '=' have incompatible types 'void __fastcall function(void *, unsigned char)' and 'void __stdcall function(void *, unsigned char)'.
If I do a double click on it, it shows me the following function:
HANDLE hTimerMain=NULL;
void WINAPI alarmInterrupt(PVOID lpParameter, unsigned char TimerOrWaitFired) {
if(!printProgress()) {
DeleteTimerQueueTimer(NULL, hTimerMain, NULL);
CreateTimerQueueTimer(
&hTimerMain,
NULL,
alarmInterrupt, /*############ <- This is the error line. */
NULL,
1000*PRINTERVAL,
0,
0
);
}
}
Winapi is __stdcall. But why is the third param of CreateTimerQueueTimer() __fastcall? If you look at this page (
Link) you will see that it is a function ptr of WAITORTIMERCALLBACK and this uses CALLBACK. CALLBACK is defined in windef.h. If I look at Pelles\Include\Win\windef.h CALLBACK and Winapi.h are booth __stdcall. So where this __fastcall comes from? (My prj includes windows.h, which includes windef.h)
Thanks
Peter