Thus, it is still unclear how to send binary data using the control from VBScript too.
1. Use WriteStr()
I can create a string which has \x00 character, let's say in the second position, i.e. str = "a" & Chr(0) & "b".
Len(str) reports 3.
SPortX.WriteStr(str) returns 1, as if it stops at the first 0 char. No good.
2. Use WriteVariant()
Create an array like this:
a = Array(CByte(&H01), CByte(&H00), CByte(&H03))
SPortX.WriteVariant(a) returns 0. No good.
Could you please post an example on how is it possible to send a string with 0 char or an array of bytes with this ActiveX control using VBScript?
Your response would be greatly appreciated. Thank you.