Dear people
why can I compile this code in 32 bits but not in 64 bits?
#INCLUDE Once "windows.bi"
#INCLUDE Once "win/commdlg.bi"
#INCLUDE Once "win/commctrl.bi"
#INCLUDE Once "crt.bi"
Dim Shared hCodegen As HWND
Dim Shared lpCodegenProc As WNDPROC
Declare Function CodegenProc(Byval hWnd As HWND, _
Byval wMsg As UINT, Byval wParam As WPARAM, _
Byval lParam As LPARAM) As LRESULT
'error 20: type mismatch, before ')' in lpCodegenProc = Cast(WNDPROC,SetWindowLongPtr(hCodegen, GWLP_WNDPROC, Cast(Long,@CodegenProc)))
lpCodegenProc = Cast(WNDPROC,SetWindowLongPtr(hCodegen, GWLP_WNDPROC, Cast(Long,@CodegenProc)))
Function CodegenProc(Byval hWnd As HWND, _
Byval Msg As UINT, Byval wParam As WPARAM, _
Byval lParam As LPARAM) As LRESULT
Function = CallWindowProc(lpCodegenProc, hWnd, Msg, wParam, lParam)
End Function
Thanks in advance for your help