Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Win32 Console Application with MFC and Winsock Facilities.

Posted on 2005-04-04
1
Medium Priority
?
329 Views
Last Modified: 2008-01-09
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:)

Regards,
Rizwan
0
Comment
Question by:syedrizwanm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
mactep13 earned 100 total points
ID: 13711935
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?
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question