I have a little problem with this code.
Main proc
xor rcx, rcx
call GetModuleHandleA
sub rsp, 30h
mov rsp, 0
lea r9, DialogMain
mov r8, 0
mov rdx, 1000h
mov rcx, rax
call DialogBoxParamA
add rsp, 30h
ret
DialogMain proc ;hDlg=rcx uMsg=rdx wParam=r8 lParam= r9
cmp rdx, WM_CLOSE
jne @F
sub rsp, 12h
End_Dialog rcx, 0
add rsp, 12h
@@:
xor rax, rax
ret
DialogMain endp
Exit_Process
Main endp
end
It's compiled but don't worked...
any suggestions?
you need to handle WM_INITDIALOG too, and return TRUE for it if i remember right
It doesn't work because memory was wrong. Should be 38h reserved.