In my 1st 64-bit program the following code works just fine.
In my 2nd 64-bit program the following code works just fine.
In my 3rd 64-bit program it produces an error at L2.
Same code in all three programs.
What have I done wrong?????
WinMain:
FRAME hInst,hPrevInst,CmdLine,CmdShow
LOCAL wc:WNDCLASSEXA,msg:MSG,hWnd,RR:RECT
L1:
INVOKE GetMessageA,addr msg,0,0,0
test eax,eax ;see if it is WM_QUIT
jz >L3 ;yes
cmp eax,-1
je >L2
INVOKE TranslateMessage,addr msg
INVOKE DispatchMessageA,addr msg
jmp L1 ;after message is dealt with, loop back for next one
L2:
;msg4 db 'in message loop',0
;msg5 db 'error in return value',0
invoke MessageBox, [hWnd], addr msg4, addr msg5, MB_OK ;true
L3: ;message was WM_QUIT
ret
ENDF