summaryrefslogtreecommitdiff
path: root/sal/systools
diff options
context:
space:
mode:
authorJesús Corrius <jesus@softcatala.org>2010-11-03 18:46:17 +0100
committerJesús Corrius <jesus@softcatala.org>2010-11-03 18:46:58 +0100
commit9bbe2716397c37f597aca71a9aad703e7e29b149 (patch)
tree1c69795adf58137e79e5a2f5a4a5cf9a21161b8a /sal/systools
parentc22e9dd07066d69e5303b27ccf7c23a041d19676 (diff)
Remove unused code
Diffstat (limited to 'sal/systools')
-rw-r--r--sal/systools/win32/kill/kill.cxx50
1 files changed, 0 insertions, 50 deletions
diff --git a/sal/systools/win32/kill/kill.cxx b/sal/systools/win32/kill/kill.cxx
index 7c2122d3a32b..81732ae8fb07 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