diff options
author | Jesús Corrius <jesus@softcatala.org> | 2010-11-03 18:46:17 +0100 |
---|---|---|
committer | Jesús Corrius <jesus@softcatala.org> | 2010-11-03 18:46:58 +0100 |
commit | cc7cd7ca3754ea8060ac1e06d55d6e2cec797fa1 (patch) | |
tree | 595a55305450bd99e4af539cc0ec04fafc2478e9 /sal/systools | |
parent | e3a59289ba1e44cc394b4f2499f2910b189e3a78 (diff) |
Remove unused code
Diffstat (limited to 'sal/systools')
-rw-r--r-- | sal/systools/win32/kill/kill.cxx | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/sal/systools/win32/kill/kill.cxx b/sal/systools/win32/kill/kill.cxx index 4a6fa5290..9740e8c33 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 |