爲什麽在xp下運行時出錯?以下是代碼,請高手指點
cisc 2002-02-07 09:37:17 .386P
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
.data
message db 'Sleeping Chind :)',0
myMessageBox dd 0
DllName db 'USER32.DLL',0
FunctionName db 'MessageBoxA',0
hModule dd 0
crazy segment
start:
; Show message
push offset DllName
call GetModuleHandleA
mov hModule, eax
push offset FunctionName
push hModule
call GetProcAddress
mov myMessageBox, eax
push MB_OK
push offset message
push offset message
push NULL
call myMessageBox
error:
exit:
; Quit program
invoke ExitProcess, NULL
crazy ends
end start