Solved

WSAAsyncSelect() calls using FD_ACCEPT

Posted on 1997-10-29
2
768 Views
Last Modified: 2013-12-03
Can some one tell me how you would use WSAAsyncSelect with FD_ACCEPT?

Would it look like this?  :

WSAAsyncSelect(...);
listen(..);

WINAPI wndProc(WORD wMsg, WPARAM wParam, LPARAM lParam)
{
  switch(wMsg) {
  case FD_ACCEPT:
      g_sMySocket = accept(g_sMyPreviousSocket...);
}


???

or should the accept call be made outside of the switch statement after the WSAAsyncSelect() call?


I've never seen this used like this, which is why I'm asking.

Thanks.
V
0
Comment
Question by:vinniew
2 Comments
 
LVL 7

Accepted Solution

by:
faster earned 20 total points
ID: 1408046
Your idea is correct, that is how we do in a recent project.
0
 
LVL 3

Author Comment

by:vinniew
ID: 1408047
Thanks.
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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

912 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

22 Experts available now in Live!

Get 1:1 Help Now