Click here to Skip to main content
15,939,960 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover6-Dec-07 0:00
CodingLover6-Dec-07 0:00 
GeneralRe: Read a byte stream into separate buffers. Pin
toxcct6-Dec-07 0:07
toxcct6-Dec-07 0:07 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover6-Dec-07 0:28
CodingLover6-Dec-07 0:28 
GeneralRe: Read a byte stream into separate buffers. [modified] Pin
toxcct6-Dec-07 1:55
toxcct6-Dec-07 1:55 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover6-Dec-07 17:28
CodingLover6-Dec-07 17:28 
GeneralRe: Read a byte stream into separate buffers. Pin
jhwurmbach6-Dec-07 4:11
jhwurmbach6-Dec-07 4:11 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover6-Dec-07 17:31
CodingLover6-Dec-07 17:31 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover5-Dec-07 23:39
CodingLover5-Dec-07 23:39 
Ok here are the details.

First thing is,
toxcct wrote:
char* pszBuffer = new char[nSize + 1];


I'm not clear why you set the size of buffer to nSize, I mean that int values don't give the number of bytes of the rest of the stream or the string.

I got the following error on this line.


toxcct wrote:
::strncpy(pszBuffer, InMsg.GetDataBuffer(), nSize);




error C2664: 'strncpy' : cannot convert parameter 2 from 'BYTE *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

I appreciate your help all the time...
Eranga Smile | :)

GeneralRe: Read a byte stream into separate buffers. Pin
CPallini5-Dec-07 23:44
mveCPallini5-Dec-07 23:44 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover5-Dec-07 23:51
CodingLover5-Dec-07 23:51 
GeneralRe: Read a byte stream into separate buffers. Pin
David Crow6-Dec-07 2:56
David Crow6-Dec-07 2:56 
JokeOf course, on such systems you need a CRC... Pin
CPallini5-Dec-07 23:20
mveCPallini5-Dec-07 23:20 
GeneralRe: Of course, on such systems you need a CRC... Pin
toxcct5-Dec-07 23:24
toxcct5-Dec-07 23:24 
QuestionCListCtrl Get selection? Pin
Johpoke5-Dec-07 21:28
Johpoke5-Dec-07 21:28 
AnswerRe: CListCtrl Get selection? Pin
CPallini5-Dec-07 21:50
mveCPallini5-Dec-07 21:50 
GeneralRe: CListCtrl Get selection? Pin
Johpoke5-Dec-07 22:14
Johpoke5-Dec-07 22:14 
GeneralRe: CListCtrl Get selection? Pin
Nelek5-Dec-07 22:58
protectorNelek5-Dec-07 22:58 
AnswerRe: CListCtrl Get selection? Pin
David Crow6-Dec-07 3:01
David Crow6-Dec-07 3:01 
GeneralReceive LVN_BEGINDRAG in parent dialog of CListCtrl, but no LVN_ENDDRAG Pin
followait5-Dec-07 21:25
followait5-Dec-07 21:25 
Generalyyuuyuu Pin
vghh5-Dec-07 21:16
sussvghh5-Dec-07 21:16 
General16 bit image using Bitmap or TIFF using VC++ (MFC control) Pin
sunny.rana5-Dec-07 21:10
sunny.rana5-Dec-07 21:10 
GeneralRe: 16 bit image using Bitmap or TIFF using VC++ (MFC control) Pin
CPallini5-Dec-07 21:38
mveCPallini5-Dec-07 21:38 
GeneralInternet Printing Pin
Rajeev Verma5-Dec-07 20:48
Rajeev Verma5-Dec-07 20:48 
GeneralRe: Internet Printing Pin
Nelek5-Dec-07 22:56
protectorNelek5-Dec-07 22:56 
QuestionGetWindowModuleFileName (Succeed/Failed) ? Pin
nitin35-Dec-07 20:16
nitin35-Dec-07 20:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.