Solved

Using winsock32 without wnd

Posted on 2000-04-02
2
192 Views
Last Modified: 2010-04-10
Can I attach other message queue to socket created using winsock32, other then Wnd message queue?
Can I use winsock32 without Wnd?
0
Comment
Question by:ramic
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 2677873
By using the WSAxxx socket function and the Overlapped Socket IO, you can have the WSAxxx functions call functions of your choice when events you are interested in happen.

The Windows message based scheme is actually built on top of this overlapped function call framework and it just sends windows messages when the functions get called.

0
 
LVL 3

Expert Comment

by:Try
ID: 2678408
Basically, any class derived from CCmdTarget is a candidate for having its own message pump, and with the availability of 'CSocket::OnMessagePending', override this member function to look for particular messages from Windows and respond to them in your socket.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now