* directory or online at http://www.openafs.org/dl/license10.html
*/
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
extern "C" {
#include <afs/param.h>
#include <afs/stds.h>
DWORD WINAPI SERVER::CanTalkToServer_ThreadProc (PVOID lp)
{
- int idSection = (int)lp;
+ int idSection = PtrToInt(lp);
// Until we post a notification saying that we've entered
// a section, we don't need to worry about the aRefSec[] entry
// the lpServer pointer won't have been freed.)
//
PVOID hCell;
- PVOID hBOS;
- PVOID hVOS;
+ PVOID hBOS = NULL;
+ PVOID hVOS = NULL;
TCHAR szServer[ cchNAME ];
//
DWORD dwThreadID;
HANDLE hThread;
- if ((hThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)CanTalkToServer_ThreadProc, (PVOID)idSection, 0, &dwThreadID)) == NULL)
+ if ((hThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)CanTalkToServer_ThreadProc, IntToPtr(idSection), 0, &dwThreadID)) == NULL)
{
EnterCriticalSection (pcsRefSec);
aRefSec[ idSection ].fInUse = FALSE;