;#Mode=CON
.386
.model flat, stdcall
option casemap :none
include windows.inc
include user32.inc
include kernel32.inc
include masm32.inc
include libc.inc
includelib msvcrt.lib
includelib user32.lib
includelib kernel32.lib
includelib masm32.lib
include macro.asm
.data
buffer db "F:\\3d\\6\\存档\\ren.hwb",0
wenjian HANDLE ?
ff dd 41088d dup (0)
.CODE
hwb proc
local read:dword
invoke CreateFile,ADDR buffer,\
GENERIC_READ,\
FILE_SHARE_READ,\
0,\
OPEN_EXISTING,\
FILE_ATTRIBUTE_ARCHIVE,\
0
mov wenjian,eax
cmp eax,INVALID_HANDLE_VALUE
jz @F
lea eax,ff
invoke SetFilePointer,wenjian,0,0,FILE_BEGIN
invoke ReadFile,wenjian,offset ff,10000,read,0
invoke CloseHandle,wenjian
@@:
ret
hwb endp
START:
invoke hwb
invoke printf,CTXT("%s"),offset ff
;int 3h
invoke ExitProcess,0
end START
[此贴子已经被作者于2007-10-2 16:18:51编辑过]