String vs Hex data
My data is in Hex. The first 6 bytes are (\h 19 0B 00 00 00 14) of 26 bytes data. I used WebTcpipRecv(hWeb0,sData,26,nRcvd) to capture the traffic and stored 26 bytes into sData, which defined as 'string'. But it shows 2 un-readabled characters when printing, and worked as first 2 bytes (19 0B) when used.
The string sData may have problem to handle the hex data, and treated "00 00 00" as terminate signal and terminated here, so only first two bytes stored in sData.
Any suggestion to fix it? (array, etc. ?) Thanks.
Re: String vs Hex data
The data (26 bytes) is saved, but can not handled by regular string functions. It's confirmed with print(string(BinLen(sData))); the result is 26 bytes. Using strcpy to take last 20 bytes (sessionID) into another variable (sesID)for sessionID. It's working fine now. I got help from Segue for this. Hopefull it's helpful for other facing the same problem. Thanks.