Click here to Skip to main content
15,908,843 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do you get the number of colors displayed? Pin
Ryan Binns20-Jul-03 16:30
Ryan Binns20-Jul-03 16:30 
GeneralRe: How do you get the number of colors displayed? Pin
Atlantys20-Jul-03 16:54
Atlantys20-Jul-03 16:54 
GeneralRe: How do you get the number of colors displayed? Pin
Ryan Binns20-Jul-03 17:55
Ryan Binns20-Jul-03 17:55 
GeneralRe: How do you get the number of colors displayed? Pin
Atlantys20-Jul-03 19:19
Atlantys20-Jul-03 19:19 
GeneralRe: How do you get the number of colors displayed? Pin
Ryan Binns20-Jul-03 19:28
Ryan Binns20-Jul-03 19:28 
GeneralRe: How do you get the number of colors displayed? Pin
Atlantys20-Jul-03 19:52
Atlantys20-Jul-03 19:52 
GeneralRe: How do you get the number of colors displayed? Pin
Terry O'Nolley21-Jul-03 1:39
Terry O'Nolley21-Jul-03 1:39 
GeneralRe: How do you get the number of colors displayed? Pin
Ryan Binns21-Jul-03 1:45
Ryan Binns21-Jul-03 1:45 
AnswerRe: How do you get the number of colors displayed? Pin
Atlantys20-Jul-03 15:47
Atlantys20-Jul-03 15:47 
GeneralMSDN 2003 Pin
Toni7820-Jul-03 13:32
Toni7820-Jul-03 13:32 
GeneralRe: MSDN 2003 Pin
Atlantys20-Jul-03 14:50
Atlantys20-Jul-03 14:50 
GeneralRe: MSDN 2003 Pin
Toni7820-Jul-03 15:27
Toni7820-Jul-03 15:27 
GeneralRe: MSDN 2003 Pin
Atlantys20-Jul-03 15:41
Atlantys20-Jul-03 15:41 
GeneralRe: MSDN 2003 Pin
Ryan Binns20-Jul-03 15:48
Ryan Binns20-Jul-03 15:48 
GeneralRe: MSDN 2003 Pin
Toni7820-Jul-03 16:04
Toni7820-Jul-03 16:04 
GeneralRe: MSDN 2003 Pin
Ryan Binns20-Jul-03 16:31
Ryan Binns20-Jul-03 16:31 
GeneralRe: MSDN 2003 Pin
Atlantys20-Jul-03 16:57
Atlantys20-Jul-03 16:57 
GeneralRe: MSDN 2003 Pin
J. Dunlap20-Jul-03 20:08
J. Dunlap20-Jul-03 20:08 
GeneralControl Panel applet Pin
TSimoes20-Jul-03 11:35
TSimoes20-Jul-03 11:35 
GeneralTCP/IP Question Pin
arunkk20-Jul-03 11:32
arunkk20-Jul-03 11:32 
GeneralRe: TCP/IP Question Pin
Ilushka20-Jul-03 20:49
Ilushka20-Jul-03 20:49 
Thats simple. Smile | :)

Send expects a [long constant pointer to TCHAR] variable, so just putting somthing of type byte isn`t right. still, the second parameter of .Send is
a length of data to be sent, thats it in TCHARs.

So make it that way:

Suppose you have a

BYTE g_aBytes[1024];

filled with some interesting bytes and you want to send 651 of them.

just make a call like that:

iSent = m_sConnectSocket.Send((LPCTSTR) g_aBytes, 651);

here you do s old-style C cast from array of bytes to LPCTSTR. Also you expicitly tell the socket how much data you`d like to send. That`ll do the trick, unless you dont use UNICODE. Smile | :)

In general , from your post i see you`re not much expirienced in C++ programming. I recommend some serious reading - for example Bjane Stroustroup
C++ programming language third edition.

Be good,


Sincerely yours, Ilya Kalujny.
GeneralFindFiles Pin
pranavamhari20-Jul-03 9:27
pranavamhari20-Jul-03 9:27 
GeneralRe: FindFiles Pin
John R. Shaw20-Jul-03 11:37
John R. Shaw20-Jul-03 11:37 
QuestionFree graphing library? Pin
Nathan Evans20-Jul-03 7:43
Nathan Evans20-Jul-03 7:43 
AnswerRe: Free graphing library? Pin
John R. Shaw20-Jul-03 11:40
John R. Shaw20-Jul-03 11:40 

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.