Click here to Skip to main content
15,916,288 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralI need a thorough understanding of CRC! Pin
stevenson27-Sep-02 22:59
stevenson27-Sep-02 22:59 
GeneralRe: I need a thorough understanding of CRC! Pin
Todd Jeffreys28-Sep-02 16:51
Todd Jeffreys28-Sep-02 16:51 
GeneralRe: I need a thorough understanding of CRC! Pin
Mike Nordell28-Sep-02 19:32
Mike Nordell28-Sep-02 19:32 
QuestionHow to create a toolbar in win32 application? Pin
27-Sep-02 22:40
suss27-Sep-02 22:40 
AnswerRe: How to create a toolbar in win32 application? Pin
Ed Gadziemski28-Sep-02 4:08
professionalEd Gadziemski28-Sep-02 4:08 
AnswerRe: How to create a toolbar in win32 application? Pin
Mike Nordell28-Sep-02 19:34
Mike Nordell28-Sep-02 19:34 
GeneralWindows hooks enumeration Pin
27-Sep-02 20:39
suss27-Sep-02 20:39 
GeneralBind Error Pin
John Bosko27-Sep-02 20:08
John Bosko27-Sep-02 20:08 
Hi,Confused | :confused:
I am in very New to VC, and I have written a code which will connect to another machine and return either a -1 or non negative value.
I am getting a "-1" for bind function. Please can some one help me
out with it..

==============================================================
#include <stdio.h>
#include <winsock.h>
#include <windows.h>
#include <iostream.h>

WSADATA wsData;
SOCKADDR_IN saServer;
SOCKET s;

void main()
{
WORD wVersionRequested = MAKEWORD(1,1);
int nRet,sd,d;

//
// Initialize WinSock
//
nRet = WSAStartup(wVersionRequested, &wsData);
printf("WSASTARTUP nret = %d\n",nRet);
sd = socket(AF_INET, SOCK_STREAM, 0);
printf("SOCKET = %ld\n",s);
saServer.sin_family=AF_INET;
saServer.sin_addr.s_addr = inet_addr("192.168.0.4");
saServer.sin_port=htons(80);

d = bind(s,(struct sockaddr*)&saServer,sizeof(saServer));
printf("BIND = %ld\n",d);
getchar();
}
=============================================================
GeneralRe: Bind Error Pin
adara28-Sep-02 1:18
adara28-Sep-02 1:18 
QuestionHow to select a ListCtrl's item? Pin
fat88827-Sep-02 19:57
fat88827-Sep-02 19:57 
AnswerRe: How to select a ListCtrl's item? Pin
Roman Fadeyev28-Sep-02 0:50
Roman Fadeyev28-Sep-02 0:50 
GeneralFlash file in VC++ application Pin
umakanth27-Sep-02 19:19
umakanth27-Sep-02 19:19 
GeneralRe: Flash file in VC++ application Pin
Tili28-Sep-02 7:58
Tili28-Sep-02 7:58 
QuestionAsk about fprintf function? Pin
ooosawaddee327-Sep-02 19:03
ooosawaddee327-Sep-02 19:03 
AnswerRe: Ask about fprintf function? Pin
RedZenBird27-Sep-02 19:21
RedZenBird27-Sep-02 19:21 
AnswerRe: Ask about fprintf function? Pin
Renjith Ramachandran28-Sep-02 2:34
Renjith Ramachandran28-Sep-02 2:34 
QuestionHow to simulate keyboard input to a console application? Pin
Anonymous27-Sep-02 18:43
Anonymous27-Sep-02 18:43 
AnswerRe: How to simulate keyboard input to a console application? Pin
Roman Fadeyev28-Sep-02 0:57
Roman Fadeyev28-Sep-02 0:57 
GeneralRe: How to simulate keyboard input to a console application? Pin
Anonymous28-Sep-02 4:17
Anonymous28-Sep-02 4:17 
AnswerRe: How to simulate keyboard input to a console application? Pin
Mike Nordell28-Sep-02 19:47
Mike Nordell28-Sep-02 19:47 
GeneralDelay loading dll error Pin
DarrollWalsh27-Sep-02 18:15
DarrollWalsh27-Sep-02 18:15 
GeneralRe: Delay loading dll error Pin
RedZenBird27-Sep-02 19:31
RedZenBird27-Sep-02 19:31 
GeneralRe: Delay loading dll error Pin
Roman Fadeyev28-Sep-02 1:08
Roman Fadeyev28-Sep-02 1:08 
GeneralRe: Delay loading dll error Pin
Renjith Ramachandran28-Sep-02 3:01
Renjith Ramachandran28-Sep-02 3:01 
GeneralCListCtrl Report-style subitem image problem Pin
IGx8927-Sep-02 15:55
IGx8927-Sep-02 15:55 

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.