GetFileSize() in VB
Private Declare Function GetFileSize Lib "kernel32" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
Dim TempFileNum As Long
TempFileNum = FreeFile
Dim TempHigh As Long
Open "somefile.fil" For Binary As TempFileNum
Dim FileSize As Long
FileSize = GetFileSize(TempFileNum, TempHigh)
The GetFileSize always return -1, what is wrong?
November 18, 2000 11:09 PM
You should just use FileLen(FileNumber)
it will give you the langth of the file
the API requres you to open the file with
the file API Engine
.....
-Killer
it will give you the langth of the file
the API requres you to open the file with
the file API Engine
.....
-Killer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement