Windows CE-Specific MFC API Functions & Messages

MFC for Windows CE supports a new global function and a new window message that you can use in conjunction with the CCeSocket class. Windows CE does not natively support asynchronous event notification. Although CeSocket simulates asynchronous notifications, you may sometimes need to directly send messages to the window used by the by a CeSocket object.

You use the WM_SOCKET_NOTIFY message in a Windows CE application to notify a socket of an asynchronous event, for instance, when the socket to which it's connected is closing.

The WM_SOCKET_NOTIFY message is processed by a socket window that's maintained as part of the module's thread state. Use the AfxGetCeSocketWindow function to obtain the handle to this window.

For an example of how to use AfxGetCeSocketWindow and WM_SOCKET_NOTIFY in a Windows CE socket application, see the CHATTER/CHATSRVR sample application.