- Timestamp:
- Jul 21, 2008, 6:43:29 PM (16 years ago)
- Location:
- trunk/ab5.0/ablib/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/IO/FileInfo.ab
r523 r562 64 64 End If 65 65 66 Dim length As QWord67 If GetFileSizeEx(hFile, VarPtr(length)) Then68 69 Return length 70 Else71 CloseHandle(hFile)72 Throw New IOException("FileInfo.Length: Failed to GetFileSize" )66 Dim pLength = VarPtr(Length) As *ULARGE_INTEGER 67 pLength->LowPart = GetFileSize(hFile, VarPtr(pLength->HighPart)) 68 CloseHandle(hFile) 69 70 Dim error = GetLastError() 71 If pLength->LowPart = INVALID_FILE_SIZE And error <> NO_ERROR Then 72 Throw New IOException("FileInfo.Length: Failed to GetFileSize", HRESULT_FROM_WIN32(error)) 73 73 End If 74 74 End Function -
trunk/ab5.0/ablib/src/api_system.sbp
r556 r562 559 559 ) As BOOL 560 560 Declare Function GetFileSize Lib "kernel32" (hFile As HANDLE, pFileSizeHigh As *DWord) As DWord 561 Declare Function GetFileSizeEx Lib "kernel32" (hFile As HANDLE, pFileSizeHigh As *QWord) As Boolean561 'Declare Function GetFileSizeEx Lib "kernel32" (hFile As HANDLE, pFileSizeHigh As *QWord) As Boolean 562 562 Declare Function GetFileTime Lib "kernel32" (hFile As HANDLE, ByRef lpCreationTime As FILETIME, ByRef lpLastAccessTime As FILETIME, ByRef lpLastWriteTime As FILETIME) As BOOL 563 563
Note:
See TracChangeset
for help on using the changeset viewer.