Chirieac
May 24th, 2008, 09:01 AM
Hello!
I'm trying to make an asynchronous socket class with WSAAsyncSelect.
I get an unhandled exception on this events when I call virtual functions like OnAccept from WndProc. I have the pointer for the instance of the class in the window: SetWindowLong(hwnd, GWL_USERDATA, (long) ((LPCREATESTRUCT)lParam)->lpCreateParams);
If I try to connect to a socket that is listening I get an error.
If I remove the keyword virtual from the function and try now to connect the Onaccept is called with no problem, but I need those function to be virtual.
What is the problem?
Thanks for reading my post, bye!
I'm trying to make an asynchronous socket class with WSAAsyncSelect.
I get an unhandled exception on this events when I call virtual functions like OnAccept from WndProc. I have the pointer for the instance of the class in the window: SetWindowLong(hwnd, GWL_USERDATA, (long) ((LPCREATESTRUCT)lParam)->lpCreateParams);
If I try to connect to a socket that is listening I get an error.
If I remove the keyword virtual from the function and try now to connect the Onaccept is called with no problem, but I need those function to be virtual.
What is the problem?
Thanks for reading my post, bye!