Update of /cvsroot/decaldev/source/LobbyHook
In directory sc8-pr-cvs1:/tmp/cvs-serv17238
Modified Files:
stdafx.h LobbyHook.cpp
Log Message:
Add semaphore for determining when lobby is injected into
Index: stdafx.h
===================================================================
RCS file: /cvsroot/decaldev/source/LobbyHook/stdafx.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** stdafx.h 13 May 2003 07:16:12 -0000 1.1
--- stdafx.h 20 May 2003 04:50:47 -0000 1.2
***************
*** 11,14 ****
#include <windows.h>
#include <tchar.h>
!
#include <atlbase.h>
--- 11,14 ----
#include <windows.h>
#include <tchar.h>
! #include <stdio.h>
#include <atlbase.h>
Index: LobbyHook.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/LobbyHook/LobbyHook.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** LobbyHook.cpp 15 May 2003 04:56:46 -0000 1.2
--- LobbyHook.cpp 20 May 2003 04:50:47 -0000 1.3
***************
*** 63,66 ****
--- 63,68 ----
}
+ HANDLE g_hLobbySemaphore = NULL;
+
BOOL APIENTRY DllMain( HANDLE hModule, DWORD dwCallReason, LPVOID lpReserved )
{
***************
*** 72,75 ****
--- 74,82 ----
// Hook CreateProcessA and bail.
hookFunctionsByExport( "AsheronsCall.dll", _hooks, 1, true );
+
+ TCHAR tszBuffer [256];
+
+ _stprintf (tszBuffer, _T("__LOBBYHOOK_%d"), ::GetCurrentProcessId ());
+ g_hLobbySemaphore = ::CreateSemaphore (NULL, 0, 1, tszBuffer);
break;
}
***************
*** 80,83 ****
--- 87,91 ----
// Unhook CreateProcessA and bail.
hookFunctionsByExport( "AsheronsCall.dll", _hooks, 1, false );
+ ::CloseHandle (g_hLobbySemaphore);
break;
}
|