I've got a problem using CAsyncSocket in an ATL control (dll generated with ATL Appwizard) : The Create() method asserts because AfxGetInstanceHandle returns NULL.
You need to include MFC in your project settings. In VC 6 it is on the "General" tab in the project settings. In VC 7 the settings have a completely different UI but it is in there somewhere. Also you will have to manually #include the MFC headers since you did not chose the option in the App Wizard.
You're right ! I've just found it at the same time... this is the solution. I need to call AFX_MANAGE_STATE(AfxGetStaticModuleState()) before calling Create() member of CAsyncSocket !
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.