Log Message:
-----------
No longer does ForceLibrary have to be in system32.
Modified Files:
--------------
/cvsroot/decaldev/source/DenAgent:
TrayWnd.cpp
Revision Data
-------------
Index: TrayWnd.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/DenAgent/TrayWnd.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- TrayWnd.cpp 30 May 2003 01:37:51 -0000 1.12
+++ TrayWnd.cpp 12 Jun 2003 12:36:20 -0000 1.13
@@ -204,6 +204,7 @@
RegKey key;
+ TCHAR szDll[ MAX_PATH ];
TCHAR szDllPath[ MAX_PATH ];
memset( szDllPath, 0, sizeof( szDllPath ) / sizeof( szDllPath[0] ) );
@@ -211,7 +212,11 @@
{
DWORD dwChars = MAX_PATH - 1;
if( key.QueryStringValue( _T( "AgentPath" ), szDllPath, &dwChars ) == ERROR_SUCCESS )
- lstrcat( szDllPath, _T( "\\LobbyHook.dll" ) );
+ {
+ lstrcpy( szDll, szDllPath );
+ lstrcat( szDll, _T( "\\ForceLibrary.dll" ) );
+ }
+
else
{
DWORD dwError = GetLastError();
@@ -233,14 +238,26 @@
if( szDllPath[0] )
{
- HMODULE hLib = (HMODULE) ForceLibraryNow( dwProcessId, szDllPath );
+ HMODULE hLib = (HMODULE) ForceLibraryNow( dwProcessId, szDll );
+ if( hLib == NULL )
+ {
+ DWORD dwError = GetLastError();
+ char szBuffer[256];
+
+ _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (ForceLibrary.dll) failed: 0x%08lx", dwError );
+ MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK );
+ }
+
+ lstrcpy( szDll, szDllPath );
+ lstrcat( szDll, _T( "\\LobbyHook.dll" ) );
+ hLib = (HMODULE) ForceLibraryNow( dwProcessId, szDll );
if( hLib == NULL )
{
DWORD dwError = GetLastError();
char szBuffer[256];
- _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow failed: 0x%08lx", dwError );
+ _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (LobbyHook.dll) failed: 0x%08lx", dwError );
MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK );
}
}
|