Hi,all
Because some reason I must call INT 21 for Read/Write file in my Miniport driver in Windows 98(se),when I Open a file use blow code:
_asm
{
mov ebx,70A0h
xor ecx,ecx
mov edx, 00000001
lea esi,filename ; ESI -> name of file to open
mov ax, 716Ch ; AX = function code (extended open/create)
push 21h ; push 21h as arg for Exec_Vxd_Int
} // prepare for INT 21
VMMCall(_ExecVxDInt);
_asm
{ // test return code
movzx eax, ax
jc error ; skip if error
mov hfile, eax
xor eax, eax ; STATUS_SUCCESS
error:
mov code, eax ; save error code
}
When I call INT 21 for READ file with the opened file handle(see above code) several times, then the system told me “Invalid handle value”.I haven’t call INT 21 to close my opened file handle, but the file handle become Invalid. I don’t know why!!
Can someone hlep me ?
Any advice is important! Thanks in advance!
Crasher Guo
guodongzi@163.net
2002-08-05