Click here to Skip to main content
16,005,389 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Passing structure to function Pin
Mark Salsbery20-Dec-06 16:02
Mark Salsbery20-Dec-06 16:02 
AnswerRe: Passing structure to function Pin
Sam Hobbs20-Dec-06 17:32
Sam Hobbs20-Dec-06 17:32 
GeneralRe: Passing structure to function Pin
Oliver12322-Dec-06 7:18
Oliver12322-Dec-06 7:18 
QuestionSocket question: How to send different datatypes in a byte array ? Pin
FreeCastle20-Dec-06 10:48
FreeCastle20-Dec-06 10:48 
AnswerRe: Socket question: How to send different datatypes in a byte array ? Pin
Chris Losinger20-Dec-06 11:06
professionalChris Losinger20-Dec-06 11:06 
AnswerRe: Socket question: How to send different datatypes in a byte array ? Pin
CPallini20-Dec-06 11:11
mveCPallini20-Dec-06 11:11 
GeneralRe: Socket question: How to send different datatypes in a byte array ? Pin
FreeCastle21-Dec-06 2:48
FreeCastle21-Dec-06 2:48 
GeneralRe: Socket question: How to send different datatypes in a byte array ? Pin
CPallini21-Dec-06 3:51
mveCPallini21-Dec-06 3:51 
FreeCastle wrote:
I get then from this byte array the original values back


if you, at the opposite side of the TCP line, don't know what is the nature of the data contained inside the byte array then you are lost. So maybe you have to preceede each chunk of data with, say, a marker section (maybe few bytes) that state:

(1) the type of the following items
(2) the lenght of the following items

Hey, you're establishing a protocol! Smile | :)



FreeCastle wrote:
Btw when I send data with TCP/IP, do I have to send it was unicode (TCHAR) or normal (unsigned char) ?


When you are sending bulk data maybe BYTES (hence unsigned char) are more appropriate.

Smile | :)


hope that helps.

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

GeneralRe: Socket question: How to send different datatypes in a byte array ? Pin
FreeCastle22-Dec-06 9:42
FreeCastle22-Dec-06 9:42 
QuestionProblem displaying characters above the normal ASCII Range Pin
TheDelChop20-Dec-06 9:57
TheDelChop20-Dec-06 9:57 
AnswerRe: Problem displaying characters above the normal ASCII Range Pin
PJ Arends20-Dec-06 10:42
professionalPJ Arends20-Dec-06 10:42 
GeneralRe: Problem displaying characters above the normal ASCII Range Pin
TheDelChop20-Dec-06 10:54
TheDelChop20-Dec-06 10:54 
Questionps2 adapter interface Pin
ahmad al-omar20-Dec-06 7:37
ahmad al-omar20-Dec-06 7:37 
QuestionCListCtrl - FindItem - finding sub-items Pin
Like2Byte20-Dec-06 6:56
Like2Byte20-Dec-06 6:56 
AnswerRe: CListCtrl - FindItem - finding sub-items Pin
James R. Twine20-Dec-06 7:28
James R. Twine20-Dec-06 7:28 
QuestionProgram is all hosed up...need OOP/MFC help Pin
CoffeeAddict1920-Dec-06 6:42
CoffeeAddict1920-Dec-06 6:42 
AnswerRe: Program is all hosed up...need OOP/MFC help Pin
Chris Losinger20-Dec-06 7:47
professionalChris Losinger20-Dec-06 7:47 
AnswerRe: Program is all hosed up...need OOP/MFC help Pin
Mark Salsbery20-Dec-06 7:51
Mark Salsbery20-Dec-06 7:51 
GeneralRe: Program is all hosed up...need OOP/MFC help Pin
CoffeeAddict1920-Dec-06 9:24
CoffeeAddict1920-Dec-06 9:24 
QuestionProblem with D3DFont Aliasing [modified] Pin
Dustin Henry20-Dec-06 6:37
Dustin Henry20-Dec-06 6:37 
QuestionShell Programming Pin
Fwzklmn20-Dec-06 5:37
Fwzklmn20-Dec-06 5:37 
AnswerRe: Shell Programming Pin
Robert Kuster20-Dec-06 5:46
Robert Kuster20-Dec-06 5:46 
AnswerRe: Shell Programming Pin
James R. Twine20-Dec-06 6:25
James R. Twine20-Dec-06 6:25 
QuestionMFC CEdit scrollbar question Pin
FredrickNorge20-Dec-06 4:57
FredrickNorge20-Dec-06 4:57 
AnswerRe: MFC CEdit scrollbar question Pin
Robert Kuster20-Dec-06 5:37
Robert Kuster20-Dec-06 5:37 

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.