Here's my problem:
I have a binary file that has been created with Visual Basic 6. It contains structures. Every structure contain fixed length variables, like integers, longs, doubles and strings (for example: Dim TypeCode as string *3). the VB6 program reads the structures from the file with Get-method.
I have to read the same file in VB .NET 2003-application. For this I use FileGet-method. I've changed the datatypes of the variables so that they should match VB6 (integer to short and long to integer). I used proper classes to determine that they're fixed length variables.
The first two structures are read fine, but then a problem occurs: In VB6 there is an array that contains 6 same structures (Global array(5) as structure). It's read in a loop. I determined the array same way (Public array(5) as structure), but an error occurs in FileGet-method. It says "Object type cannot be converted to target type".
What to do? All variables should be as they are in VB6.
I have a binary file that has been created with Visual Basic 6. It contains structures. Every structure contain fixed length variables, like integers, longs, doubles and strings (for example: Dim TypeCode as string *3). the VB6 program reads the structures from the file with Get-method.
I have to read the same file in VB .NET 2003-application. For this I use FileGet-method. I've changed the datatypes of the variables so that they should match VB6 (integer to short and long to integer). I used proper classes to determine that they're fixed length variables.
The first two structures are read fine, but then a problem occurs: In VB6 there is an array that contains 6 same structures (Global array(5) as structure). It's read in a loop. I determined the array same way (Public array(5) as structure), but an error occurs in FileGet-method. It says "Object type cannot be converted to target type".
What to do? All variables should be as they are in VB6.