Click here to Skip to main content
15,914,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help with classes and threads Pin
Blake Miller30-Jun-00 18:12
Blake Miller30-Jun-00 18:12 
GeneralRe: Help with classes and threads Pin
Blake Miller30-Jun-00 18:15
Blake Miller30-Jun-00 18:15 
GeneralProblem with cascaded controls Pin
Lea Johnson29-Jun-00 18:21
Lea Johnson29-Jun-00 18:21 
GeneralRe: Problem with cascaded controls Pin
Sam Hobbs29-Jun-00 20:14
Sam Hobbs29-Jun-00 20:14 
GeneralZ-order of children Pin
Sam Hobbs29-Jun-00 17:54
Sam Hobbs29-Jun-00 17:54 
GeneralRe: Z-order of children Pin
Lea Johnson29-Jun-00 18:32
Lea Johnson29-Jun-00 18:32 
GeneralRe: Z-order of children Pin
Sam Hobbs29-Jun-00 20:01
Sam Hobbs29-Jun-00 20:01 
GeneralBug in my BMP-routine... Pin
Christoph Rupp29-Jun-00 11:06
sussChristoph Rupp29-Jun-00 11:06 
GeneralRe: Bug in my BMP-routine... Pin
Paolo Messina30-Jun-00 8:10
professionalPaolo Messina30-Jun-00 8:10 
GeneralRe: Bug in my BMP-routine... Pin
Christoph Rupp30-Jun-00 21:20
sussChristoph Rupp30-Jun-00 21:20 
GeneralRe: Bug in my BMP-routine... Pin
Paolo Messina1-Jul-00 4:30
professionalPaolo Messina1-Jul-00 4:30 
GeneralRe: Bug in my BMP-routine... Pin
Paolo Messina1-Jul-00 4:50
professionalPaolo Messina1-Jul-00 4:50 
GeneralRe: Bug in my BMP-routine... thanks, Paolo Pin
Christoph Rupp1-Jul-00 22:51
sussChristoph Rupp1-Jul-00 22:51 
GeneralImage library (Re: Bug in my BMP-routine... thanks, Paolo) Pin
Uwe Keim2-Jul-00 21:30
sitebuilderUwe Keim2-Jul-00 21:30 
GeneralInterface Pin
Member 375684729-Jun-00 9:04
Member 375684729-Jun-00 9:04 
GeneralCEdit vs CStatic Pin
Paul Galla29-Jun-00 6:37
sussPaul Galla29-Jun-00 6:37 
GeneralRe: CEdit vs CStatic Pin
Mike Dunn29-Jun-00 7:48
Mike Dunn29-Jun-00 7:48 
GeneralResuming FTP / HTTP downloads... Pin
xtsea29-Jun-00 4:25
xtsea29-Jun-00 4:25 
QuestionHow to check a socket is disconnected Pin
Stefan29-Jun-00 3:23
Stefan29-Jun-00 3:23 
AnswerRe: How to check a socket is disconnected Pin
Yaron29-Jun-00 3:43
Yaron29-Jun-00 3:43 
hi,

i really need help in windows sockets, here is a function i wrote to connect to server:

//----------- Function Implementation --------------------------------
bool ConnectToSocket()
{
if (WSAVERNOTSUPPORTED == WSAStartup(MAKEWORD(2,0),&WSAData))
{
printf("WSAStartup Failed!\r\n");
return FALSE;
}//end if
else
{
printf("WSAStartup Success\r\n");
}//end else

// construct socket
sock = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if (sock == INVALID_SOCKET)
{
printf("Failed to construct socket!\r\n");
WSACleanup();
return FALSE;
}//end if
else
{
printf("Socket construction....Success\r\n");
}//end else

// fill in socket address struct and connect to server
sa.sin_family = AF_INET;
sa.sin_port = 23;
sa.sin_addr.S_un.S_addr = inet_addr("147.234.12.233");

int iErr = connect( sock,(SOCKADDR *)&sa,sizeof(sa));


return TRUE;
}

it doesn't seem to work ,i dont know why..... also how do i receive and send data????

please help me i am desperate!

tnx a lot
yaron
GeneralRe: How to check a socket is disconnected Pin
RamiBuchnik29-Jun-00 4:31
RamiBuchnik29-Jun-00 4:31 
QuestionDebug Assertion Failed ? Pin
kasjhdfkjhfj29-Jun-00 3:12
kasjhdfkjhfj29-Jun-00 3:12 
AnswerRe: Debug Assertion Failed ? Pin
Christoph Rupp29-Jun-00 11:03
sussChristoph Rupp29-Jun-00 11:03 
GeneralRe: Debug Assertion Failed ? Thanks Chris Pin
kasjhdfkjhfj30-Jun-00 3:41
kasjhdfkjhfj30-Jun-00 3:41 
GeneralMessage handler Pin
Bjorn29-Jun-00 1:44
Bjorn29-Jun-00 1:44 

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.