Async Windows Message
Yo. I''m having trouble defining my Windows message when i declare my socket as an Async socket. I get the impression you can call it whatever you want right? Like WM_ASYNC or WM_WSAASYNC or whetever. However, I get an error saying my message declaration (in the function) is an undefined constant and in the callback function case statement I get an error saying the case expression is not constant. What''s goin on here??
==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================
Drew Sikora
Executive Producer
GameDev.net
You need to assign a numerical value to your windows message.
So if you use WM_ASYNC you should have somewhere:
#define WM_ASYNC (WM_USER + 5)
(or some other value instead of 5) or use a const statement.
const int WM_ASYNC = WM_USER + 2;
So if you use WM_ASYNC you should have somewhere:
#define WM_ASYNC (WM_USER + 5)
(or some other value instead of 5) or use a const statement.
const int WM_ASYNC = WM_USER + 2;
I thought the socket sent your winproc those msg''s when it recieved a packet (ie you shouldn''t be sending them)
Just talking out my arse though...
Just talking out my arse though...
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Magmai Kai Holmlor: The third argument to the WSAAsyncSelect() call is the window message that will posted by winsock when an network event occurs. You need to know it''s numerical value both for the call to WSAAsyncSelect() and in order to register your message handler within the message pump.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement