Click here to Skip to main content
15,898,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionStatic Text Control with White Background Pin
Bram van Kampen21-Oct-11 15:14
Bram van Kampen21-Oct-11 15:14 
QuestionRe: Static Text Control with White Background Pin
David Crow21-Oct-11 15:43
David Crow21-Oct-11 15:43 
AnswerRe: Static Text Control with White Background Pin
«_Superman_»21-Oct-11 16:55
professional«_Superman_»21-Oct-11 16:55 
QuestionCMFCListCtrl and Sorting Pin
Richard Zey21-Oct-11 12:58
Richard Zey21-Oct-11 12:58 
QuestionRe: CMFCListCtrl and Sorting Pin
David Crow21-Oct-11 13:39
David Crow21-Oct-11 13:39 
AnswerRe: CMFCListCtrl and Sorting Pin
Richard Zey24-Oct-11 5:12
Richard Zey24-Oct-11 5:12 
GeneralRe: CMFCListCtrl and Sorting Pin
Richard Zey24-Oct-11 7:43
Richard Zey24-Oct-11 7:43 
Questioncopy bytes from receive buffer pointer Pin
jkirkerx21-Oct-11 12:35
professionaljkirkerx21-Oct-11 12:35 
I finally got my SQL Server broadcast to work, and I receive the correct data back to my socket.

bytesReceived = recv(sUDPSocket, recvbuf, recvbuflen, 0);

Now I need to get a copy of what's in the buffer, and pass it for further processing. I have learned that the buffer I made is a group of bytes, 1 char is 1 byte, so my recvbuf is set to 96.

Do I need to copy each byte 1 at at time?, or can they all be copied in one shot. If I do need to copy 1 at a time, do I use strcopy?

C#
for ( int i = 0; bytesReceived -1; i++ ) {
                strncpy ( pBuffer, recvbuf, 1 );
            }

            _process_SQL_BufferData(pBuffer, bytesReceived);

AnswerRe: copy bytes from receive buffer pointer Pin
André Kraak21-Oct-11 12:51
André Kraak21-Oct-11 12:51 
GeneralRe: copy bytes from receive buffer pointer Pin
jkirkerx21-Oct-11 13:07
professionaljkirkerx21-Oct-11 13:07 
QuestionRe: copy bytes from receive buffer pointer Pin
André Kraak21-Oct-11 13:15
André Kraak21-Oct-11 13:15 
AnswerRe: copy bytes from receive buffer pointer Pin
jkirkerx21-Oct-11 13:18
professionaljkirkerx21-Oct-11 13:18 
AnswerRe: copy bytes from receive buffer pointer Pin
André Kraak21-Oct-11 13:31
André Kraak21-Oct-11 13:31 
QuestionRe: copy bytes from receive buffer pointer Pin
André Kraak21-Oct-11 13:32
André Kraak21-Oct-11 13:32 
AnswerRe: copy bytes from receive buffer pointer Pin
jkirkerx21-Oct-11 13:36
professionaljkirkerx21-Oct-11 13:36 
AnswerRe: copy bytes from receive buffer pointer Pin
André Kraak21-Oct-11 13:45
André Kraak21-Oct-11 13:45 
AnswerRe: copy bytes from receive buffer pointer Pin
Luc Pattyn21-Oct-11 16:05
sitebuilderLuc Pattyn21-Oct-11 16:05 
QuestionProblem with read in CFile class Pin
antonio34321-Oct-11 6:41
antonio34321-Oct-11 6:41 
AnswerRe: Problem with read in CFile class Pin
Richard MacCutchan21-Oct-11 9:26
mveRichard MacCutchan21-Oct-11 9:26 
GeneralRe: Problem with read in CFile class Pin
David Crow21-Oct-11 10:24
David Crow21-Oct-11 10:24 
GeneralRe: Problem with read in CFile class Pin
antonio34321-Oct-11 22:26
antonio34321-Oct-11 22:26 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 0:07
mveRichard MacCutchan22-Oct-11 0:07 
GeneralRe: Problem with read in CFile class Pin
antonio34322-Oct-11 0:33
antonio34322-Oct-11 0:33 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 0:56
mveRichard MacCutchan22-Oct-11 0:56 
GeneralRe: Problem with read in CFile class Pin
antonio34322-Oct-11 1:09
antonio34322-Oct-11 1:09 

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.