469,270 Members | 1,160 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Using VisualBasic 6 Random Access Files in dotnet

Hi

I will use a Random Access File in dotnet/csharp. The file is created
with Visual Basic 6 (VB6).

My Problem is to find out the corresponding Types I had to use in
dotnet - reading the VB6 binary values.

If there are no corresponding Types I will manually convert the VB6
binary values (e.g. BinaryFormatter...). Where can I find the
definition how VB6 write Types to a random acces file ?

Thank you
Peter

Jan 22 '08 #1
5 2244
Hi,

You have to know the format used in VB6 and then you can use a compatible
type in .NET, if no compatible type exist most probably you can find an
equivalent.

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Peter" <pR****@procom-gmbh.comwrote in message
news:bf**********************************@i29g2000 prf.googlegroups.com...
Hi

I will use a Random Access File in dotnet/csharp. The file is created
with Visual Basic 6 (VB6).

My Problem is to find out the corresponding Types I had to use in
dotnet - reading the VB6 binary values.

If there are no corresponding Types I will manually convert the VB6
binary values (e.g. BinaryFormatter...). Where can I find the
definition how VB6 write Types to a random acces file ?

Thank you
Peter

Jan 22 '08 #2
Hi
>
I will use a Random Access File in dotnet/csharp. The file is created
with Visual Basic 6 (VB6).
My Problem is to find out the corresponding Types I had to use in
dotnet - reading the VB6 binary values.
And a example of this would be? VB6 binary sounds exiting...
Oh might not be UTF-8 encoded... there is a fix for that...
big/little endian? nope... dont think so...

Hmm... no more ideas...

//CY
Jan 22 '08 #3
<ch*******@gmail.comwrote in message
news:56**********************************@i7g2000p rf.googlegroups.com...
>>I will use a Random Access File in dotnet/csharp. The file is created
with Visual Basic 6 (VB6).
My Problem is to find out the corresponding Types I had to use in
dotnet - reading the VB6 binary values.

And a example of this would be? VB6 binary sounds exiting...
The language exited but the files remain.
Oh might not be UTF-8 encoded... there is a fix for that...
Of course the files weren't UTF-8 encoded. Binary data had to avoid the
corruption that would be caused by converting between ANSI and Unicode.
Text data had to be displayable by applications like Notepad on operating
systems like Windows 98. Microsoft handled the binary part pretty well, but
they lost data in the text part. Anyway, when reading an existing file, the
binary part should be pretty well readable, and the portion of the text part
that wasn't lost can be read by calling MultiByteToWideChar.
big/little endian? nope... dont think so...
Right. The names of the binary types have changed, but the actual binary
formats haven't.

Jan 23 '08 #4
>
Right. *The names of the binary types have changed, but the actual binary
formats haven't.
so

int oh_here;
using (Stream s = new FileStream(@"c:\vb6lostdata.bin",
FileMode.Open)) {
while ((oh_here = s.ReadByte()) != -1) {Console.Write("'{0}'",
(char)oh_here);}}

wont work?

I tought all data in a file where binary data... silly me...
just had some problems with writing notepad 'هنِ' and then reading
them in c#
//CY
Jan 24 '08 #5
On 24 Jan, 20:08, christ...@gmail.com wrote:
Right. *The names of the binary types have changed, but the actual binary
formats haven't.

so

int oh_here;
using (Stream s = new FileStream(@"c:\vb6lostdata.bin",
FileMode.Open)) {
* * while ((oh_here = s.ReadByte()) != -1) {Console.Write("'{0}'",
(char)oh_here);}}

wont work?

I tought all data in a file where binary data... silly me...
just had some problems with writing notepad 'هنِ' and then reading
them in c#
//CY
Think he got chr$(12) from me... I dont have it ... I dont get it
either...
Jan 26 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

121 posts views Thread by typingcat | last post: by
10 posts views Thread by Tamir Khason | last post: by
8 posts views Thread by Mike Owen | last post: by
13 posts views Thread by Stuart | last post: by
6 posts views Thread by RML | last post: by
39 posts views Thread by Alan Isaac | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.