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

C / C++ / MFC

 
GeneralRe: Splitter with fixed size Pin
Dialecticus25-Oct-11 6:14
Dialecticus25-Oct-11 6:14 
Questionhow to Add the help file in SDI Application Pin
sarfaraznawaz23-Oct-11 21:01
sarfaraznawaz23-Oct-11 21:01 
AnswerRe: how to Add the help file in SDI Application Pin
Richard MacCutchan23-Oct-11 22:38
mveRichard MacCutchan23-Oct-11 22:38 
AnswerRe: How to call the html help api Pin
App_24-Oct-11 6:25
App_24-Oct-11 6:25 
QuestionSetCurrentDirectory Pin
sarfaraznawaz23-Oct-11 19:42
sarfaraznawaz23-Oct-11 19:42 
AnswerRe: SetCurrentDirectory Pin
tolw23-Oct-11 21:58
tolw23-Oct-11 21:58 
AnswerRe: SetCurrentDirectory Pin
App_24-Oct-11 2:58
App_24-Oct-11 2:58 
Questionworking with byte arrays Pin
jkirkerx22-Oct-11 8:58
professionaljkirkerx22-Oct-11 8:58 
I understand now that the data I receive from a socket is a byte array.

But I don't understand how to pass the byte array to a function for further processing. Plus I'm not sure if I should leave it as a byte array, or try to convert it to a string, so I can extract data from it. I'm confused as to whether this buffer is a pointer to data somewhere else, and If I need to make a copy of it, before passing it to a function. When I pass it to a function, the data is lost.

Kind of tired of going around in circles here on this, and I need road map to head in the right direction.

I make my receive buffer
char recvbuf[256];

I get data
0x05 '' 0x54 'T' 0x53 'S' 0x65 'e'

And I try to pass it to a function for processing. Unless just extracting the info I need does not require a function. Suggestion?

void _process(char *pbuffer)
{
}
AnswerRe: working with byte arrays Pin
Chuck O'Toole22-Oct-11 9:35
Chuck O'Toole22-Oct-11 9:35 
GeneralRe: working with byte arrays Pin
jkirkerx22-Oct-11 15:46
professionaljkirkerx22-Oct-11 15:46 
AnswerRe: working with byte arrays Pin
Albert Holguin22-Oct-11 12:02
professionalAlbert Holguin22-Oct-11 12:02 
GeneralRe: working with byte arrays Pin
jkirkerx22-Oct-11 15:51
professionaljkirkerx22-Oct-11 15:51 
AnswerRe: working with byte arrays Pin
Richard MacCutchan22-Oct-11 21:46
mveRichard MacCutchan22-Oct-11 21:46 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 8:07
professionaljkirkerx23-Oct-11 8:07 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 8:26
mveRichard MacCutchan23-Oct-11 8:26 
AnswerRe: working with byte arrays Pin
Erudite_Eric23-Oct-11 1:58
Erudite_Eric23-Oct-11 1:58 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 8:22
professionaljkirkerx23-Oct-11 8:22 
GeneralRe: working with byte arrays Pin
Goto_Label_23-Oct-11 8:44
Goto_Label_23-Oct-11 8:44 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 9:02
mveRichard MacCutchan23-Oct-11 9:02 
GeneralRe: well done, you cracked the code Pin
App_23-Oct-11 9:06
App_23-Oct-11 9:06 
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 

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.