Solved

WSAAsyncSelect() calls using FD_ACCEPT

Posted on 1997-10-29
2
775 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 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