[Libreoffice-commits] .: sal/systools
Jesús Corrius
jcorrius at kemper.freedesktop.org
Wed Nov 3 10:47:40 PDT 2010
sal/systools/win32/kill/kill.cxx | 50 ---------------------------------------
1 file changed, 50 deletions(-)
New commits:
commit cc7cd7ca3754ea8060ac1e06d55d6e2cec797fa1
Author: Jesús Corrius <jesus at softcatala.org>
Date: Wed Nov 3 18:46:17 2010 +0100
Remove unused code
diff --git a/sal/systools/win32/kill/kill.cxx b/sal/systools/win32/kill/kill.cxx
index 4a6fa52..9740e8c 100644
--- a/sal/systools/win32/kill/kill.cxx
+++ b/sal/systools/win32/kill/kill.cxx
@@ -73,57 +73,7 @@ static inline bool IsValidHandle( HANDLE handle )
// Retrieves function adress in another process
/////////////////////////////////////////////////////////////////////////////
-#if 1
#define GetProcAddressEx( hProcess, hModule, lpProcName ) GetProcAddress( hModule, lpProcName )
-#else
-FARPROC WINAPI GetProcAddressEx( HANDLE hProcess, HMODULE hModule, LPCSTR lpProcName )
-{
- FARPROC lpfnProcAddress = GetProcAddress( hModule, lpProcName );
-
- if ( lpfnProcAddress )
- {
- DWORD dwProcessId = GetProcessId( hProcess );
-
- if ( GetCurrentProcessId() != dwProcessId )
- {
- FARPROC lpfnRemoteProcAddress = NULL;
- TCHAR szBaseName[MAX_PATH];
-
- if ( GetModuleBaseName( GetCurrentProcess(), hModule, szBaseName, SAL_N_ELEMENTS(szBaseName) ) )
- {
- HMODULE ahModules[MAX_MODULES];
- DWORD cbNeeded = 0;
-
- if ( EnumProcessModules( hProcess, ahModules, sizeof(ahModules), &cbNeeded ) )
- {
- ULONG nModules = cbNeeded / sizeof(ahModules[0]);
-
- for ( ULONG n = 0; n < nModules; n++ )
- {
- TCHAR szRemoteBaseName[MAX_PATH];
-
- if ( GetModuleBaseName(
- hProcess, ahModules[n], szRemoteBaseName, SAL_N_ELEMENTS(szRemoteBaseName) ) &&
- 0 == lstrcmpi( szRemoteBaseName, szBaseName )
- )
- {
- lpfnRemoteProcAddress = lpfnProcAddress;
-
- if ( ahModules[n] != hModule )
- *(LPBYTE*)&lpfnRemoteProcAddress += (LPBYTE)ahModules[n] - (LPBYTE)hModule;
- break;
- }
- }
- }
- }
-
- lpfnProcAddress = lpfnRemoteProcAddress;
- }
- }
-
- return lpfnProcAddress;
-}
-#endif
/////////////////////////////////////////////////////////////////////////////
// Raises a signal in an other process
More information about the Libreoffice-commits
mailing list