Click here to Skip to main content
15,909,953 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can i have only client area of window Pin
efanHarris26-Oct-04 20:16
efanHarris26-Oct-04 20:16 
GeneralRe: how can i have only client area of window Pin
David Crow27-Oct-04 10:30
David Crow27-Oct-04 10:30 
GeneralIs there any free Modem Simulator which can tell Call States or some other way to debug Modem application with Modem Pin
Kapoor Vikrant26-Oct-04 4:28
Kapoor Vikrant26-Oct-04 4:28 
GeneralRe: Is there any free Modem Simulator which can tell Call States or some other way to debug Modem application with Modem Pin
Blake Miller26-Oct-04 6:14
Blake Miller26-Oct-04 6:14 
QuestionHow to dump information into text file which I got from _CrtDumpMemoryLeaks() ? Pin
Amarelia26-Oct-04 4:24
Amarelia26-Oct-04 4:24 
GeneralBuilding Wizards Pin
shevi202726-Oct-04 2:57
shevi202726-Oct-04 2:57 
GeneralRe: Building Wizards Pin
Blake Miller26-Oct-04 6:17
Blake Miller26-Oct-04 6:17 
GeneralFail to bind the socket Pin
amitranjanmishra26-Oct-04 1:23
amitranjanmishra26-Oct-04 1:23 
I have created 2 sockets .
I fr my server application <192.168.2.20> port 80
I fr my client. IP Address assigned: 192.168.0.51 port 80
Both The applications reside on the same machine.

When I execute the server it runs fine
But when I run the Client , it shows error code : 10047

Yeah, After surfing the net I got to know that Protocol family not supported ...
But the problem iz........

Unless the Connection is not established between the two applications
how come it give such error.
What Can there be other possibilities?
The portion causing error is Enclosed.
Rose | [Rose] With hope to recv earliest suggestions i Thnx in Advance.Rose | [Rose]
int main()<br />
{<br />
::<br />
::<br />
sock_creation();<br />
::<br />
::<br />
}<br />
<br />
int sock_creation()<br />
{<br />
	int rc,k;<br />
	struct sockaddr_in addr;<br />
	char *servername;<br />
	struct WSAData wsaData;<br />
	printf("\n Count 10 n Resume ...\n");<br />
	int wsaret=WSAStartup(0x101,&wsaData);<br />
	if(wsaret<0)	<br />
	{<br />
		printf("Unable to Initialize Windows Socket Library");<br />
		k=getch();<br />
		exit(1);<br />
	}<br />
	<br />
	else <br />
	{<br />
		printf("\n Initialized Windows Socket Library");<br />
		<br />
	}<br />
<br />
	<br />
	conn=socket(AF_INET,SOCK_STREAM,0);<br />
	servAddr.sin_addr.s_addr=inet_addr("192.168.0.51");<br />
	servAddr.sin_port=htons(u_short(8080));<br />
<br />
	<br />
	if(conn==INVALID_SOCKET)<br />
    {<br />
		printf("\n But Unable to Initialize Windows Socket");<br />
		k=getch();<br />
		exit(1);<br />
	}<br />
		else <br />
	{<br />
		printf(" \n Initialized Windows Socket As Well.....");<br />
		<br />
	}<br />
		if(bind(conn,(sockaddr*)&servAddr,sizeof(servAddr))!=0)<br />
    {<br />
         printf("\n But Failed to bind !!! Error Code %d\n ",WSAGetLastError());<br />
		 k=getch();<br />
		 exit(1);<br />
    }<br />
<br />
	<br />
	servAddrSrvr.sin_addr.s_addr=inet_addr("192.168.0.20");<br />
	servAddrSrvr.sin_family=AF_INET;<br />
	servAddrSrvr.sin_port=htons(80);<br />
//	connect(conn,(struct sockaddr*)&servAddrSrvr,sizeof(servAddrSrvr));<br />
	<br />
return 0;<br />
}<br />



amit mishra
GeneralRe: Fail to bind the socket Pin
dharani26-Oct-04 21:20
dharani26-Oct-04 21:20 
GeneralRe: Fail to bind the socket Pin
amitranjanmishra27-Oct-04 3:21
amitranjanmishra27-Oct-04 3:21 
GeneralRe: Fail to bind the socket Pin
markkuk27-Oct-04 10:08
markkuk27-Oct-04 10:08 
GeneralOpen the binary file and convert the hexadecimal number Pin
Alex Wong 1926-Oct-04 0:35
Alex Wong 1926-Oct-04 0:35 
GeneralRe: Open the binary file and convert the hexadecimal number Pin
David Crow26-Oct-04 4:37
David Crow26-Oct-04 4:37 
Generalfolder size limitation Pin
Raphael Kindt25-Oct-04 23:52
Raphael Kindt25-Oct-04 23:52 
GeneralRe: folder size limitation Pin
vikramlinux26-Oct-04 2:23
vikramlinux26-Oct-04 2:23 
GeneralRe: folder size limitation Pin
David Crow26-Oct-04 8:59
David Crow26-Oct-04 8:59 
QuestionHow to Set the controls to be infront of an Image Pin
wicked_guy25-Oct-04 23:47
wicked_guy25-Oct-04 23:47 
AnswerRe: How to Set the controls to be infront of an Image Pin
Robert A. T. Káldy26-Oct-04 0:32
Robert A. T. Káldy26-Oct-04 0:32 
Questionhow to use this : IAMMultiMediaStream::OpenMoniker Pin
blackbeetle25-Oct-04 23:39
blackbeetle25-Oct-04 23:39 
GeneralDialog with different controls created at runtime Pin
SVPG25-Oct-04 23:30
SVPG25-Oct-04 23:30 
GeneralRe: Dialog with different controls created at runtime Pin
Robert A. T. Káldy26-Oct-04 0:23
Robert A. T. Káldy26-Oct-04 0:23 
GeneralRe: Dialog with different controls created at runtime Pin
BlackDice26-Oct-04 3:42
BlackDice26-Oct-04 3:42 
Questionhow to use ::* Pin
Anonymous25-Oct-04 23:15
Anonymous25-Oct-04 23:15 
AnswerRe: how to use ::* Pin
Robert A. T. Káldy26-Oct-04 0:15
Robert A. T. Káldy26-Oct-04 0:15 
GeneralRe: how to use ::* Pin
Anonymous26-Oct-04 20:34
Anonymous26-Oct-04 20:34 

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.