Thanks for the reply, i am right in saying that that section of code will only send the number of bytes recieved?
I would like to actually display what those bytes are....Any ideas mate?
Cheers.
golanshahar
July 14th, 2006, 02:41 PM
Thanks for the reply, i am right in saying that that section of code will only send the number of bytes recieved?
I would like to actually display what those bytes are....Any ideas mate?
Cheers.
Well what is the variable that holds the bytes? And what type is it? If it lpBuf and it is declared as simple BYTE array you can simply pass it to SetDlgItemText().
Cheers
gbrooks3
July 14th, 2006, 02:57 PM
Hi, thanks for the help, i am really still new to this, if you could give me a quick "for instance" example, that would be great.
I Dont want to use SetDlgItemText, as i want to just show the bytes recieved on a new line in my listbox :)
I did try using lpBuf as in: ::SendMessage(hWndList, LB_ADDSTRING, 0, ( LPARAM ) lpBuf );
But all that was displayed in the listbox was the Euro (currency) sign.
Your help is greatly appreciated :)
golanshahar
July 14th, 2006, 03:03 PM
Hi, thanks for the help, i am really still new to this, if you could give me a quick "for instance" example, that would be great.
I Dont want to use SetDlgItemText, as i want to just show the bytes recieved on a new line in my listbox :)
I did try using lpBuf as in: ::SendMessage(hWndList, LB_ADDSTRING, 0, ( LPARAM ) lpBuf );
But all that was displayed in the listbox was the Euro (currency) sign.
Your help is greatly appreciated :)
Are you sure those are not the bytes that are sent? What do you expect to get?
Cheers
gbrooks3
July 14th, 2006, 03:19 PM
Yep the bytes are stored in lpBuf i get 8 bytes (using com logger to check)...
Any ideas?
golanshahar
July 14th, 2006, 03:34 PM
Yep the bytes are stored in lpBuf i get 8 bytes (using com logger to check)...
Any ideas?
That’s ok, my question was about the point you said that you add the lpBuf to the list box and saw a euro currency sign, so my question is why you think this is not the correct bytes that you are getting? What do you expect to get?
Cheers
gbrooks3
July 14th, 2006, 03:43 PM
ah, i see. Well, according to the Comport logger, i should get:
80 00 03 01 FF FF FF FF
Going back over an older piece of my code for command line, i used the routine: