You are trying to use null-terminated strings to store binary data. That's
your basic problem.
Instead use a char array [but do not use any string manipulation functions
on it] or use a void* instead. And then use the Buffer-Manipulation Routines
like memcpy, memcmp etc.

Signature
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com
> Hi Nishanth,
> I am using Winsock on the windows side for recv().
[quoted text clipped - 58 lines]
>> >>
>> >> thanks and regards
Pravin Prabhu - 14 Jul 2005 13:19 GMT
Hi Nishant,
Actually I am storing (binary) Image data which i obtain from
an imaging device in a Char Array. The Image data already has lots of null
characters as part of image data, so when i copy into a char array it
automatically becomes a null terminated string. and when i try to transmit
the Char array i face problems.
> You are trying to use null-terminated strings to store binary data. That's
> your basic problem.
[quoted text clipped - 65 lines]
> >> >>
> >> >> thanks and regards