News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

WM_SOCKET

Started by Robert Collins, January 12, 2005, 01:05:41 AM

Previous topic - Next topic

Robert Collins

Where is the definition for WM_SOCKET? I have searched for it in the following:

windows.inc
user32.inc
wsock32.inc
kernel32.inc
masm32.inc

but I cannot find it.

As a matter of reference, where are all the WM_ messages located?

anon

The WM_ definitions are in Windows.inc
I'm not aware of any WM_SOCKET. I searched
the PSDK to be sure, but did not find anything.

Robert Collins

Quote from: anon on January 12, 2005, 01:34:00 AM
The WM_ definitions are in Windows.inc
I'm not aware of any WM_SOCKET. I searched
the PSDK to be sure, but did not find anything.

OK, never mind. I found it. It doesn't exist in any of the .inc files. I found the definition of it in the program itself.


  '
  '
  '
.const
WM_SOCKET equ WM_USER+100    ; create a custom window message. You can use any name not
                                                   ; limited to WM_SOCKET and you can use any number not
                                                   ; limited to 100.
  '
  '


Thanks, anyway.

P1

When setting up the API WSAAsyncSelect, you need a wMsg - The message to be received when a network event occurs.
A lot of people just code this as WM_SOCKET equ WM_USER+100, As Robert has already discovered.
i.e.invoke WSAAsyncSelect,Sock,hWnd,WM_SOCKET,FD_CLOSE+FD_READ+FD_WRITE+FD_CONNECTThis message is then processed by the windows message loop for proper action.

Regards,  P1  :8)