编译正常 但运行出现停止工作
本帖最后由 鱼C--泪痕 于 2013-1-31 20:16 编辑.386
.model flat, stdcall;32 bit memory model
option casemap :none;case sensitive
include windows.inc
include kernel32.inc
include user32.inc
include Comctl32.inc
include shell32.inc
include wininet.inc
include debug.inc
includelib debug.lib
includelib wininet.lib
includelib kernel32.lib
includelib user32.lib
includelib Comctl32.lib
includelib shell32.lib
DlgProc PROTO :HWND,:UINT,:WPARAM,:LPARAM
.const
IDD_DIALOG1 equ 101
;#########################################################################
.data?
buffer db 512 dup(?)
hInstance dd ?
d dd ?
a dd ?
b dd ?
.code
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke InitCommonControls
invoke DialogBoxParam,hInstance,IDD_DIALOG1,NULL,addr DlgProc,NULL
invoke ExitProcess,0
;########################################################################
DlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
mov eax,uMsg
.if eax==WM_INITDIALOG
.elseif eax==WM_COMMAND
invokeInternetOpen,CTEXT("MY123"),INTERNET_OPEN_TYPE_PRECONFIG,CTEXT("0"),CTEXT("0"),0
mov a,eax
PrintDec eax
invokeInternetOpenUrl,a,CTEXT("http://p0.so.qhimg.com/t01f6d0a4bf155f804f.jpg"),CTEXT("0"),0,INTERNET_FLAG_RELOAD,0
PrintDec eax
mov d,eax
invoke HttpQueryInfo,d,5,addr buffer,512,0
invoke MessageBox,hWin,CTEXT("0"),CTEXT("0"),MB_OK
PrintDec eax
invoke InternetCloseHandle,eax
invoke InternetCloseHandle,d
invoke InternetCloseHandle,a
.elseif eax==WM_CLOSE
invoke EndDialog,hWin,0
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
DlgProc endp
end start
程序运行到HttpQueryInfo的时候就出现程序停止工作 这是怎么??
file:///D:\软件应用\腾讯\QQ\QQ缓存\522243299\Image\Q83HOZIG4IJHB8N`X]S)PQE.jpg
请把资源文件给我 唉重要找到原因了在掉用 invoke HttpQueryInfo,d,5,addr buffer,512,0的时候不能直接 使用512
改成加个变量 a
mov a,sizeof buffer
invoke HttpQueryInfo,d,5,addr buffer,a,0
这样运行正常了
我在看看为什么不能直接怎么写 学习了,共勉,大家加油啊 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 赚点鱼币,多谢了 http://www.fishc.com 加油!!!
页:
[1]