Click here to Skip to main content
15,921,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalsolution to this problem Pin
mickelliot31-Aug-04 11:08
mickelliot31-Aug-04 11:08 
GeneralAccessing a Class Variable Using A Void Pointer Pin
Anonymous25-Aug-04 10:47
Anonymous25-Aug-04 10:47 
GeneralRe: Accessing a Class Variable Using A Void Pointer Pin
Doug Mitchell25-Aug-04 11:21
Doug Mitchell25-Aug-04 11:21 
GeneralRe: Accessing a Class Variable Using A Void Pointer Pin
Joaquín M López Muñoz25-Aug-04 12:40
Joaquín M López Muñoz25-Aug-04 12:40 
GeneralRe: Accessing a Class Variable Using A Void Pointer Pin
Anonymous25-Aug-04 12:42
Anonymous25-Aug-04 12:42 
GeneralRe: Accessing a Class Variable Using A Void Pointer Pin
Joaquín M López Muñoz25-Aug-04 12:49
Joaquín M López Muñoz25-Aug-04 12:49 
GeneralRe: Accessing a Class Variable Using A Void Pointer Pin
Anonymous25-Aug-04 14:12
Anonymous25-Aug-04 14:12 
GeneralRe: Accessing a Class Variable Using A Void Pointer Pin
DRHuff25-Aug-04 17:14
DRHuff25-Aug-04 17:14 
GeneralRe: Accessing a Class Variable Using A Void Pointer Pin
Anonymous25-Aug-04 18:11
Anonymous25-Aug-04 18:11 
GeneralButting in... Pin
palbano25-Aug-04 18:06
palbano25-Aug-04 18:06 
Generaldumb command line question Pin
kfaday25-Aug-04 9:55
kfaday25-Aug-04 9:55 
GeneralRe: dumb command line question Pin
David Crow25-Aug-04 10:10
David Crow25-Aug-04 10:10 
GeneralRe: dumb command line question Pin
DRHuff25-Aug-04 10:13
DRHuff25-Aug-04 10:13 
GeneralBolding dates in CDateTimeCtrl Pin
DRHuff25-Aug-04 9:42
DRHuff25-Aug-04 9:42 
GeneralRe: Bolding dates in CDateTimeCtrl Pin
David Crow25-Aug-04 10:17
David Crow25-Aug-04 10:17 
GeneralRe: Bolding dates in CDateTimeCtrl Pin
DRHuff25-Aug-04 10:38
DRHuff25-Aug-04 10:38 
GeneralStop removal of null characters Pin
Tom Wright25-Aug-04 9:18
Tom Wright25-Aug-04 9:18 
GeneralRe: Stop removal of null characters Pin
David Crow25-Aug-04 10:14
David Crow25-Aug-04 10:14 
GeneralRe: Stop removal of null characters Pin
Tom Wright25-Aug-04 10:26
Tom Wright25-Aug-04 10:26 
GeneralRe: Stop removal of null characters Pin
Rick York25-Aug-04 10:41
mveRick York25-Aug-04 10:41 
GeneralRe: Stop removal of null characters Pin
Tom Wright25-Aug-04 11:20
Tom Wright25-Aug-04 11:20 
GeneralRe: Stop removal of null characters Pin
David Crow25-Aug-04 10:43
David Crow25-Aug-04 10:43 
GeneralRe: Stop removal of null characters Pin
Tom Wright25-Aug-04 11:21
Tom Wright25-Aug-04 11:21 
GeneralRe: Stop removal of null characters Pin
David Crow25-Aug-04 11:27
David Crow25-Aug-04 11:27 
GeneralRe: Stop removal of null characters Pin
Tom Wright25-Aug-04 11:48
Tom Wright25-Aug-04 11:48 
Okay, if I setup my string like this:
<br />
	char sHeader1[53]={"A"};<br />
	CString sHeader2;<br />
	sHeader2.Format("%s rest of my message here", sHeader1);<br />
	m_sConnectSocket.Send((LPCTSTR)sHeader2, strlen(sHeader2));<br />

I get this:
A rest of my message here

If I change my code to this:
char message[128];<br />
memset( message, 41, sizeof( message ) );<br />
strcpy( &message[53], " rest of message header here" );<br />
m_sConnectSocket.Send( message, 128 );<br />

I get this:
))))))))))))))))))))))))))))))))))))))))))))))))))))) rest of message header here

Now I know that the )'s are supposed to be A's I think I put in the wrong number for A.

So I replaced 41 with 0 and I got nothing.
I'm thinking that I cannot send anything with leading nulls....which if you think about it, is right....how would the system know the end of one packet and the beginning of another is it did not reference nulls as the end or beginning of something.

Tom Wright
tawright915@yahoo.com

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.