Article ID: 193101
Article Last Modified on 6/1/2005
void SocketThreadInit()
{
#ifndef _AFXDLL
#define _AFX_SOCK_THREAD_STATE AFX_MODULE_THREAD_STATE
#define _afxSockThreadState AfxGetModuleThreadState()
_AFX_SOCK_THREAD_STATE* pState = _afxSockThreadState;
if (pState->m_pmapSocketHandle == NULL)
pState->m_pmapSocketHandle = new CMapPtrToPtr;
if (pState->m_pmapDeadSockets == NULL)
pState->m_pmapDeadSockets = new CMapPtrToPtr;
if (pState->m_plistSocketNotifications == NULL)
pState->m_plistSocketNotifications = new CPtrList;
#endif
}
This function should be called once in each secondary thread before the
first socket is created in the new thread. 194022 Visual Studio 6.0 service packs, what, where, why
194295 How to tell that a Visual Studio service pack is installed
175668 MultiSoc: Illustrates using sockets in multiple threads
175668 MultiSoc: Illustrates using sockets in multiple threads
Additional query words: LookupHandle CAsyncSocket AttachHandle GetValueAt assert wincore.cpp 980 Application Error 0xc0000005 m_pHashTable CSocket access violation debug assertion failed
Keywords: kbtshoot kbbug kbfix kbnoupdate kbwinsock kbvs600sp3fix KB193101