
Fixed String and Fixed Array
Are the characters in the file Unicode or ASCII? VB6
would read characters as ASCII and convert them to Unicode
automatically. You may be reading two bytes at a time
rather than one.
Also, I don't know how to interpret the attributes but an
array declaration of 3 allocates 4 elements.
Keith
Quote:
>-----Original Message-----
>I am having trouble converting this VB6 Type into a
VB.Net Structure.
>It's made hard by having fixed strings and fixed arrays.
I continue to get
>bad record lenth errors. This is despite the fact that
the length of a file
Quote:
>with one record in it is exactly the same length as the
VB.Net structure.
>Any help would be greatly appreciated...
>Public Type STANK8DATA
> Number(CLARTANKS) As String * 3
> TpMin(CLARTANKS) As Single
> TpMax(CLARTANKS) As Single
> Process(CLARTANKS) As String * 25
>End Type
>Public Structure STANK8DATA
> <VBFixedString(3), VBFixedArray(CLARTANKS)> Dim Number
() As String
> <VBFixedArray(CLARTANKS)> Dim TpMin() As Single
> <VBFixedArray(CLARTANKS)> Dim TpMax() As Single
> <VBFixedString(25), VBFixedArray(CLARTANKS)> Dim
Process() As String
>End Structure
>Derrick
>.