September 24th, 1999, 07:43 AM
My VB app receives a Winsock msg from an OS/2 machine, containing 8 bytes of binary data and a 100 byte message. I can convert the character data to unicode with Strconv, but I can't seem to unload the return code bytes into any VB data type. Code fragment:
' get the socket message
WinsockClient.GetData strData
' Convert and unpack the message header
uniString = StrConv(strData, vbUnicode)
string = mid(uniString, 9, 100) ' An ascii msg, converts fine
integer = mid(uniString, 1, 1) ' doesn't work, before or after Unicode conversion
Any suggestions?
Thanks
' get the socket message
WinsockClient.GetData strData
' Convert and unpack the message header
uniString = StrConv(strData, vbUnicode)
string = mid(uniString, 9, 100) ' An ascii msg, converts fine
integer = mid(uniString, 1, 1) ' doesn't work, before or after Unicode conversion
Any suggestions?
Thanks