By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,479 Members | 1,231 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,479 IT Pros & Developers. It's quick & easy.

Handling binary data stream

P: n/a
Hi,

I need a VB.Net function that reads in a stream of binary data coming in
from a legacy data source. The data are actually hex numbers in binary format
but the problem is that I don't know how handle it in my VB program. All I
need is to be able to transform those bytes into hex, such as 'oxF9', but
right now all I can see are un-readable binary data. What is the best way to
do this kind of work?

Thanks

feng
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Feng,

Bytes holds hex numbers, hex is nothing more than a representation of the
binary format hold in a byte.

Your problem will be to find what structure/format is used for that stream.

The worst that can happen for you can be if even instead of ASCII, EBCDIC is
used, as by instance IBM mainframes do.

http://en.wikipedia.org/wiki/EBCDIC

I hope this helps somehow to find your solution

Cor
Nov 21 '05 #2

P: n/a
"Feng" <Fe**@discussions.microsoft.com> schrieb:
All I need is to be able to transform those bytes into hex, such as
'oxF9', but
right now all I can see are un-readable binary data.


\\\
Dim i As Integer = 234234234
MsgBox("ox" & Hex(i))
MsgBox("ox" & i.ToString("X"))
MsgBox("ox" & Convert.ToString(i, 16))
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.