Here's the problem:
I have to read an .emf-file, that contains many records of data. The data has to be read in to a structure called SI. There is an old version (made with VB5) of this function that works great.
The old version has syntax like this:
dim Fnum as integer
dim FName as string
FNum = FreeFile
Open FName For Binary As FNum
Get FNum, , SI
and I tried to write same thing in VB.NET:
dim Fnum as integer
dim FName as string
FNum = FreeFile()
FileSystem.FileOpen(FNum, FName, OpenMode.Binary)
FileSystem.FileGet(FNum, SI)
However, an error occurs in my version that says: "Non-negative number required. Parameter name: count". How can I solve this problem?
I have to read an .emf-file, that contains many records of data. The data has to be read in to a structure called SI. There is an old version (made with VB5) of this function that works great.
The old version has syntax like this:
dim Fnum as integer
dim FName as string
FNum = FreeFile
Open FName For Binary As FNum
Get FNum, , SI
and I tried to write same thing in VB.NET:
dim Fnum as integer
dim FName as string
FNum = FreeFile()
FileSystem.FileOpen(FNum, FName, OpenMode.Binary)
FileSystem.FileGet(FNum, SI)
However, an error occurs in my version that says: "Non-negative number required. Parameter name: count". How can I solve this problem?