Hugh McMaster : net: WriteFile should output the number of bytes in the char array, not the length of the WCHAR array.