Ok, here you go, however, I don't have any files big enough to test it.
.decls file, put in /userlibs folder or add to existing kernel32.decls
and test code:
.decls file, put in /userlibs folder or add to existing kernel32.decls
.lib "kernel32.dll" api_CreateFile%(FileName$, dwDesiredAccess%, dwShareMode%, lpSecurity%, dwCreationDsp%, dwFlagsAndAttr%, hTemplate%):"CreateFileA" api_GetFileSize% ( hFile%, lpFileSizeHigh*) : "GetFileSize"
and test code:
; CreateFile:Desired Access Const GENERIC_WRITE = $40000000 Const GENERIC_READ = $80000000 ; CreateFile:FlagsAndAttributes Const FILE_ATTRIBUTE_NORMAL = $80 ; CreateFile:CreationDisposition Const OPEN_EXISTING = 3 ; CreateFile:ShareMode Const FILE_SHARE_READ = 1 Const FILE_SHARE_WRITE = 2 filename$ = RequestFile() ; get api file handle hFile = api_CreateFile( filename$, GENERIC_WRITE Or GENERIC_READ, FILE_SHARE_READ Or FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) If hFile > 0 hiBank = CreateBank(8) lowDword = api_GetFileSize( hFile, hiBank) highDword = PeekInt(hiBank,0) Print lowDword Print highDword api_CloseHandle( hFile ) EndIf WaitKey End