Print Page | Close Window

Why I can't create socket ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11227
Printed Date: 15 November 2025 at 6:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Why I can't create socket ?
Posted By: lipper
Subject: Why I can't create socket ?
Date Posted: 27 June 2008 at 5:05am
I am using xtp pro 11, VC6
I want to create a SOCKET on the MDI window ,when the program running ,it reported socket create error !!
 
In my project, I create a MDI window which is inherited from CXTPMDIFrameWnd, but ,when I wanted created a socket on the child window , although the building is passed , running error displayed !! It was: Can't create socket successfully!The code followed here: 
 
CAsyncSocket*pSocket=new CAsyncSocket;
int nPort=27;
if (pSocket->Create(nPort,SOCK_DGRAM))
{
 AfxMessageBox("passed");
}else
{
AfxMessageBox("SOCKET_ERROR");
}
 
Why I can't create socket ?
 
Created socket in the child window ,the error displayed as the same.
 
If anyone has the solution ,please send email to me:
mailto:zlipper@gmail.com - zlipper@gmail.com
 
thanks



Replies:
Posted By: Oleg
Date Posted: 27 June 2008 at 4:19pm
Hi,
How it related to codejock controls ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ABuenger
Date Posted: 28 June 2008 at 7:44am
You have to add fluxcapacitor.vbx to your project 



-------------
Codejock support


Posted By: lipper
Date Posted: 29 June 2008 at 3:49am
Thank you and what does the fluxcapacitor.vbx meaning ?
How can I do with my VC 6 project ?
 
Thanks again.


Posted By: lipper
Date Posted: 29 June 2008 at 4:25am

How to deal with the problem ?



Posted By: lipper
Date Posted: 29 June 2008 at 5:17am
Sorry for my poor English.


Posted By: lipper
Date Posted: 29 June 2008 at 5:27am
I didn't initialize !
I forgot add the support of winsock!
Manual call : AfxSocketInit
 
It was done!
 
The toolkit is so good that I can't mean that I should do some basic working.
 
OK, keep touching with me : mailto:zlipper@gmail.com - zlipper@gmail.com


Posted By: SuperMario
Date Posted: 30 June 2008 at 1:48pm
Originally posted by ABuenger ABuenger wrote:

You have to add fluxcapacitor.vbx to your project 







Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net