Oh, and dwt.internal.win32.WINAPI.TIMERPROC should be alias VOID function(HWND, UINT, UINT, DWORD) TIMERPROC; not alias VOID function(HWND, UINT, UINT) TIMERPROC; Seems that it is not used anyway...