this code often returns 0 as fSize.... I'm 100% sure that the file exists... and another problem is that win9x doesn't open the fiel if I define OPEN_EXISTING and GetLastError returns that the file isn't existing! If i use the code below GetLastError returns that the file is already existing!!! but with win2k it workes fine... invoke CreateFile,OFFSET InFile,GENERIC_READ,0,0,OPEN_ALWAYS,0,0 mov hFile, eax invoke GetFileSize,hFile,0 mov fSize,eax
Posted on 2001-03-10 10:57:00 by theNOP
try this this works for me. invoke CreateFile,addr FileName,GENERIC_READ,FILE_SHARE_READ, NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL mov hFile, eax then try to use GetFilesize tel me what you get then... I hope this helps.
Posted on 2001-03-10 16:14:00 by Zcoder
nope... nope GetFileSize returns 0 to... i didn't test the problem with win9x...
Posted on 2001-03-11 11:58:00 by theNOP