I need to put a 2 byte integer into a binary file. For the sake of discussion, let’s say the integer is 27. When I use the PUT statement to write it to the binary file, it goes in as 1B 00 hex. I need it to go in as 00 1B. Is there an easy way in VB(A) to invert the MSB and the LSB without additional DLLs? Do I need to get each byte by itself and write it bytewise into the file (seems like the hard way)?
Can anyone recommend a web site that talks about bit-fiddling in VB?
Thanks for the help.