Win32 Console Application with MFC and Winsock Facilities.

Hello Potential Answerers,

I am looking to pass around some data using Winsock in VC++ 6.0 to an application in VB 6 or Vb .net lets say, the communication is supposed to be 2 way.

You will be amazed at my question after the intro I have given, I am planning to write a Win32 Console Application as a core Server for Winsock. Facing trouble in 2 things which are interlinked, 1. How can I read data using callbacks just like we have events in VB 6 for Winsock,
2. How the application be made to wait unless the app recives an END command over Winsock connection, when I run the sample application made by VC++ 6.0 (I did Add MFC support to it), it simply shows up displays the Hello World message and finishes, where as I want it to stay resident just like any normal GUI Application.

Hope u get what I mean:)

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

mactep13Connect With a Mentor Commented:
Without the MessageMap, the possibility of getting callbacks automatically does not exist. You can, however, create a small framework that will call the functions and act like a callback.

As far as the second problem, how are you setting the sockets? recv , send, listen and accept are all blocking calls and will not let your program end. Are you not calling these?
All Courses

From novice to tech pro — start learning today.