Click here to Skip to main content
15,899,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 9:18
professionaljkirkerx23-Oct-11 9:18 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 9:30
professionaljkirkerx23-Oct-11 9:30 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 9:38
mveRichard MacCutchan23-Oct-11 9:38 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 9:42
professionaljkirkerx23-Oct-11 9:42 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 9:56
mveRichard MacCutchan23-Oct-11 9:56 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 10:06
professionaljkirkerx23-Oct-11 10:06 
GeneralRe: It's like watching a soap on TV! Oh the supense Pin
Goto_Label_23-Oct-11 10:15
Goto_Label_23-Oct-11 10:15 
GeneralRe: It's like watching a soap on TV! Oh the supense Pin
jkirkerx23-Oct-11 10:21
professionaljkirkerx23-Oct-11 10:21 
oh no, it got solved! Richard wrote some code to extract the message size from byte 2, copy just the message to a new char array, termintate it with \0, and pass it to my function for processing
I'm stoked, surfer happiness, yeah!

I've been banging my head for days on this, feeling pretty stupid about it.

Thanks for watching the show!

msgLength = (recvbuf[2] << 8) + recvbuf[1];
szWords = new char[msgLength + 1];
strncpy(szWords, recvbuf + 3, msgLength);
szWords[msgLength] = '\0';
_process_SQL_BufferData(szWords, bytesReceived);
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 22:19
mveRichard MacCutchan23-Oct-11 22:19 
GeneralRe: pasing byte arrays to functions Pin
App_23-Oct-11 9:09
App_23-Oct-11 9:09 
GeneralRe: pasing byte arrays to functions Pin
jkirkerx23-Oct-11 9:13
professionaljkirkerx23-Oct-11 9:13 
GeneralRe: pasing byte arrays to functions Pin
Richard MacCutchan23-Oct-11 9:35
mveRichard MacCutchan23-Oct-11 9:35 
AnswerRe: working with byte arrays Pin
jschell24-Oct-11 8:36
jschell24-Oct-11 8:36 
GeneralRe: working with byte arrays Pin
jkirkerx24-Oct-11 10:47
professionaljkirkerx24-Oct-11 10:47 
GeneralRe: working with byte arrays Pin
jschell25-Oct-11 7:57
jschell25-Oct-11 7:57 
GeneralRe: working with byte arrays Pin
jkirkerx25-Oct-11 8:27
professionaljkirkerx25-Oct-11 8:27 
Questiondll from win32 console. Pin
appollosputnik22-Oct-11 4:35
appollosputnik22-Oct-11 4:35 
AnswerRe: dll from win32 console. Pin
Chris Losinger22-Oct-11 5:22
professionalChris Losinger22-Oct-11 5:22 
GeneralRe: dll from win32 console. Pin
appollosputnik22-Oct-11 6:09
appollosputnik22-Oct-11 6:09 
GeneralRe: dll from win32 console. Pin
Chris Losinger22-Oct-11 6:17
professionalChris Losinger22-Oct-11 6:17 
AnswerRe: dll from win32 console. Pin
Richard MacCutchan22-Oct-11 6:19
mveRichard MacCutchan22-Oct-11 6:19 
GeneralRe: dll from win32 console. Pin
appollosputnik22-Oct-11 8:27
appollosputnik22-Oct-11 8:27 
GeneralRe: dll from win32 console. Pin
Richard MacCutchan22-Oct-11 21:37
mveRichard MacCutchan22-Oct-11 21:37 
GeneralRe: dll from win32 console. Pin
appollosputnik22-Oct-11 22:24
appollosputnik22-Oct-11 22:24 
GeneralRe: dll from win32 console. Pin
Stephen Hewitt22-Oct-11 23:25
Stephen Hewitt22-Oct-11 23:25 

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.