Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Q] Passing binary data via IDispatch?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hiya

I want to write a COM server which passes binary data to and
from a piece of hardware. The server must be usable from VB.

Since I'm writing with Borland Builder C++ the obvious way
is to return a char*, but can VB cope with this? Can a BSTR
be used for this purpose?

Cheers,
Jon
 
You should be able to treat the binary data as an array of bytes. In visual basic, an array of bytes can be treated as a simple string although if you print it, it will look like gibberish. After you have the string in VB, set it equal to a dynamic array of bytes and you should be able to see each byte individually.
 
how can i see the contents of each byte.Are there any conversion functions available...Please let me know
Thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top