A byte is only 8 bits so you will have to store your result in a variable defined as a Word (16bits)Originally Posted by rocky79
Now you will need to split the word and send the highbyte and lowbyte out as two bytes.
In your VB program you will then need to take the 2 bytes and joing them back as a word.
Re-read what I wrote above regards data being sent from VB. when you call HidWriteEx, VendorId, ProductID, BufferOut(0) you are telling the USB port to send all the data in the BufferOut.Originally Posted by rocky79
So if you have defined your BufferOut as being 64 bytes long then when you call HidWriteEx it will send all 64 bytes, if you defined your BufferOut as being 8bytes long then it will send 8 bytes.
So simply load all the buffers up with the bytes you want and call HidWriteEx when you want to send.
Regards
Sean.
Bookmarks