[email protected] wrote: > > I’m looking for a little help on using WSAAsyncSelect via ctypes.I > imagine this has been asked before but I couldn’t figure out how to > search the archives (and trawling through them randomly didn’t really > help). > > ...Would it be something likethe following? > > winsock = ctypes.windll.ws2_32 > > WM_MY_SOCKET_MESSAGE= WM_USER + 1 > > … > > s =12345 > > hWnd = 1234 > > wMsg = WM_MY_SOCKET_MESSAGE > > lEvent =FD_READ|FD_WRITE|FD_ACCEPT|FD_CONNECT|FD_CLOSE > > socketErrorOrZero = winsock.WSAAsyncSelect(s, hWnd, wMsg, lEvent) >
Yes, indeed. I think that sock.socket.fileno should get you the socket handle for the first parameter. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
