본문 바로가기

Programming/MFC

timeSetEvent 64bit 오류

출처 : https://social.msdn.microsoft.com/Forums/vstudio/en-US/1d3f07b8-eb79-4127-a170-cbda5570b244/compilation-error-while-calling-timesetevent-during-64-bit-code-generation-using-vc-2008?forum=vclanguage


32bit에서 사용하던 timeSetEvent 함수가 64bit환경으로 버전업 할 경우 다음과 같은 에러가 발생한다.


My problem is I am getting a compilation error message from a call to function timeSetEvent() like

Error    1    error C2664: 'timeSetEvent' : cannot convert parameter 3 from 'void (__cdecl *)(UINT,UINT,DWORD,DWORD,DWORD)' to 'LPTIMECALLBACK'



이럴 경우 아래와 같은 방법으로 해결해주면 된다.



void (CALLBACK)(UINT uTimerID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2)