Forum Discussion
julie_mcmanus
11 years agoOccasional Contributor
Thanks for the help with this, but still running into problems.
I need to send an array of bytes in hex format so for example I might want to send - 0x02 0x88 0x1e...
Tanya's solution converts each digit from a char so 02 sets the OleValue to 48,50 or hex 30,31 when what I need is simply 02 so I seem to have an issue with the types.
Phil's solution seems to indeed fill the array with the values I'm after but there are 2 issues -
I cannot enter alphanumeric such as "3a" otherwise I get an exception
if I enter just numbers such as "2", "12" etc. the array fills ok but at the next step where I call -
socket.SendTo(binaryData, endpoint); I get an exception, Invalid Proceedure call or argument.
I need to send an array of bytes in hex format so for example I might want to send - 0x02 0x88 0x1e...
Tanya's solution converts each digit from a char so 02 sets the OleValue to 48,50 or hex 30,31 when what I need is simply 02 so I seem to have an issue with the types.
Phil's solution seems to indeed fill the array with the values I'm after but there are 2 issues -
I cannot enter alphanumeric such as "3a" otherwise I get an exception
if I enter just numbers such as "2", "12" etc. the array fills ok but at the next step where I call -
socket.SendTo(binaryData, endpoint); I get an exception, Invalid Proceedure call or argument.
Related Content
- 3 years ago
- 4 years ago
- 5 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 7 days ago