Extremely Active Member
Group: Members
Posts: 273
Member No.: 3
Joined: 12-May 04
|
Get the size of a file in a nice formated string (ex : "1,88 Mo")
CODE | GetszFileSize proc pszFile:dword, pszRet:dword � �local hFile:dword
� �invoke CreateFile, pszFile, GENERIC_READ+GENERIC_WRITE, FILE_SHARE_READ+FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL � �.if eax != INVALID_HANDLE_VALUE � � � �mov �hFile,eax � � � �invoke GetFileSize,hFile,NULL � � � �invoke StrFormatByteSize,eax,pszRet,20 � � � �invoke CloseHandle,hFile � �.endif � �ret GetszFileSize endp
|
|