السلام عليكم ، لقد واجهتني مشكلة في مقارنة سلسلتين حرفيتين طولهما 16 حرفا، و هذا هو الكود الذي لم يشتغل معي . لا أعرف لما لا يعمل ... .
.486
.model flat,stdcall
option casemap:none
include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.lib
.data
GetPassword db 16 dup(0)
CorrectPassword db 20h,20h,20h,20h,20h,20h,20h,"Congratulations you are entered a correct password",0
BadPassword db 20h,20h,20h,20h,20h,20h,20h,"By your life, you are entered a bad password !!!",0
AboutMe db 20h,20h,20h,20h,20h,20h,20h
db "Created By Hamza Qdider @:)",0Ah,0Dh,0Ah,0Dh
db "I'm the Hidden Ghost in the Life, I'm the Trojan Horse in the Computers",0Ah,0Dh,0Ah,0Dh
db 20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,20h,"So I'm not a virus as you think :)",0
AboutMeCaption db "@ About the Creator @",0
DialogIdName db "MANAGER",0
ClearBox db 00H,0
Password db "0123456789ABCDEF",0
.const
Button_ID equ 5h
Password_ID equ 3h
ShowPassword_ID equ 4h
PasswordAnalyser_ID equ 6h
.code
Wproc proto :dword,:dword,:dword,:dword
start :
invoke GetModuleHandle,0
invoke DialogBoxParam,eax,addr DialogIdName,0,Wproc,0
invoke ExitProcess,0
Wproc proc hwnd:dword,msg:dword,wparam:dword,lparam:dword
.if msg == WM_COMMAND
mov eax,wparam
.if ax == Button_ID
invoke GetDlgItemText,hwnd,Password_ID,addr GetPassword,16
push offset GetPassword
pop esi
;;invoke MessageBox,0,eax,0,MB_OK
cmp esi,offset Password
je IsCorrect
jmp IsNotCorrect
IsNotCorrect :
invoke SetDlgItemText,hwnd,PasswordAnalyser_ID,addr BadPassword
invoke SetDlgItemText,hwnd,Password_ID,addr ClearBox
mov GetPassword,00h
ret
IsCorrect :
invoke SetDlgItemText,hwnd,PasswordAnalyser_ID,addr CorrectPassword
invoke SetDlgItemText,hwnd,Password_ID,addr ClearBox
mov GetPassword,00h
ret
.endif
.endif
.if msg == WM_CLOSE
invoke MessageBox,hwnd,addr AboutMe,addr AboutMeCaption,MB_OK + MB_ICONINFORMATION
invoke EndDialog,hwnd,0
ret
.endif
invoke GetDlgItemText,hwnd,Password_ID,addr GetPassword,16
invoke SetDlgItemText,hwnd,ShowPassword_ID,addr GetPassword
xor eax,eax
ret
Wproc endp
end start
المرجو إفادتي بالحل أو على الأقل ذكر مكامن الخطأ في برنامجي (أعني في الكود) ... إليكم البرنامج :
