david.bri...@ubs.com 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, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32