pls help about this if you can
MOV ESI,OFFSET LOC_00416F58 "unikey-123132"- i whant to set this in the dialog but i get some error for that ?
pls help :red thanks
i ?
TEST EAX,EAX
JLE LOC_00405DAE
MOV ECX,DWORD PTR [ESP+018h]
MOV ESI,OFFSET LOC_00416F58
mov edi, esi
LOC_00405DAE: ;Ref: 00405D5B
INVOKE SetDlgItemText, hWnd, IDC_SERIAL,esi
If the string (zero terminated) is in the .data section then the following would work.
.data
szKey db "unikey-123132",0
.code
INVOKE SetDlgItemText, hWnd, IDC_SERIAL, ADDR szKey
.DATA
LOC_0040F34C dd 020030424h
LOC_00413C5C TCHAR 'UNIKEY-%08X',0
INVOKE SetDlgItemText, hWnd, IDC_SERIAL, ADDR szKey
still same not working ?? im confuesd ??
Not sure what TCHAR is but at the very least
the code
INVOKE SetDlgItemText, hWnd, IDC_SERIAL, ADDR szKey ; szKey was just an example, your variable name needs to be used
would be
INVOKE SetDlgItemText, hWnd, IDC_SERIAL, ADDR LOC_00413C5C
look the code i get ok number , but i when is CALL _SetDlgItemTextA@12h (INVOKE SetDlgItemText, hWnd, IDC_SERIAL, LOC_00413C5C) i get error
how set the number to the dialog ? :eek thanks for helping me
MOV EDX,DWORD PTR DS:[LOC_0040F34Ch]
OR EDX,ECX
PUSH EDX
PUSH LOC_00413C5Ch
PUSH LOC_00416F58h
CALL _wsprintfAh
ADD ESP,0Ch
PUSH LOC_00416F58h
CALL _lstrlenW@4h
MOV ECX,DWORD PTR SS:[ESP+1Ch]
CMP EAX,ECX
JLE L013
MOV EAX,ECX
L013:
TEST EAX,EAX
JLE L017
MOV ECX,DWORD PTR SS:[ESP+18h]
MOV ESI,LOC_00416F58h (ASCII "UNIKEY-20030424")
L017:
PUSH 0h
MOV AL,BYTE PTR DS:[LOC_00413C5Ch]
MOVZX AX,AL
PUSH AX
PUSH 195h
PUSH DWORD PTR SS:[EBP+8h]
CALL _SetDlgItemTextA@12h
MOV EAX,1h
JMP L031
PUSH ??001Bh
PUSH 195h
PUSH DWORD PTR SS:[EBP+8h]
CALL _SetDlgItemTextA@12h
MOV EAX,0h
L031:
POP EDI
POP ESI
POP EBX
LEAVE
RET 4h
A good example of SetDlgItemText is the dialog.asm and rsrc.rc files
from Iczelion's tutorial 10-2 that comes with MASM32.
The tutorials are a very good place to look for readable working code
that target various common topics.
If I understand your question correctly, If you want to send a number to the control on the dialog you would use:
invoke SetDlgItemInt ,hWnd, IDC_SERIAL, ADDR LOC_00413C5C, FALSE ;<-true if you want a signed number
regards,
Rags
mkdev,
The code you show here looks very much like a dis assembly of a program that you did not write...
This is against the rules ... please explain :D
sorry im biginer in masm
keygen??
The answer of being a beginner is not satisfactory under the forum rules so the topic hasd been closed.