The question you need to ask yourself first is what are you going todo with the data in the Plus! script.
This is highly important as this dictates how the data is to be send. eg: if you are going to show the data, the data must be in unicode.
If you are going to manipulate the data with JScript functions like Replace, Substr, etc it must be unicode too. If the data is like a picture stream or something you need to send it as real byte data (of course you can show this as a string too, but this requires some additional converting with the proper APIs (never simply add or remove null bytes when you want to convert from or to unicode!!!)).
But I assume you are at least going to manipulate the recieved data with Jscript functions. So send it as unicode...
But for byte arrays you can not use C-style strings (null terminated strings), you need to use BSTRs, which can contain null bytes since the length of the string is not defined by the first occurance of a null byte, but by the length indicator in front of the string.
BSTRs are unicode. But don't simply add null bytes to your original data bytes to make them unicode. That will not work and will render wrong results. You need to use proper ascii to unicode convertion.
PS: I hope I make some sense here, it is very late (or better early) here
PS2: all these problems you have for your sniffer (multithreading, infinitate loops, strings/data sending) can all easly be avoided if you use/make an AciveX DLL though