Fix unloading
This commit is contained in:
parent
bff5e90eda
commit
3fb6b5aa65
16
ANSI.c
16
ANSI.c
@ -151,6 +151,9 @@
|
||||
join multibyte characters split across separate writes;
|
||||
remove wcstok, avoiding potential interference with the host;
|
||||
similarly, use a private heap instead of malloc.
|
||||
|
||||
v1.80, 26 October, 2017:
|
||||
fix unloading.
|
||||
*/
|
||||
|
||||
#include "ansicon.h"
|
||||
@ -1598,6 +1601,8 @@ BOOL HookAPIAllMod( PHookFn Hooks, BOOL restore, BOOL indent )
|
||||
if (me.hModule == hDllInstance || me.hModule == hKernel)
|
||||
continue;
|
||||
|
||||
if (!restore)
|
||||
{
|
||||
// Don't scan what we've already scanned.
|
||||
if (*(PDWORD)((PBYTE)me.hModule + 36) == 'ISNA') // e_oemid, e_oeminfo
|
||||
{
|
||||
@ -1612,6 +1617,17 @@ BOOL HookAPIAllMod( PHookFn Hooks, BOOL restore, BOOL indent )
|
||||
*(PDWORD)((PBYTE)me.hModule + 36) = 'ISNA';
|
||||
VirtualProtect( (PBYTE)me.hModule + 36, 4, pr, &pr );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*(PDWORD)((PBYTE)me.hModule + 36) != 'ISNA' &&
|
||||
*(PDWORD)((PBYTE)me.hModule + 0x3C) >= 0x40)
|
||||
{
|
||||
if (log_level & 16)
|
||||
DEBUGSTR( 2, "%s%s %S", sp, zSkipping, me.szModule );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (search_env( L"ANSICON_EXC", me.szModule ))
|
||||
{
|
||||
DEBUGSTR( 2, "%s%s %S", sp, zIgnoring, me.szModule );
|
||||
|
@ -87,7 +87,7 @@
|
||||
add error codes to some message.
|
||||
*/
|
||||
|
||||
#define PDATE L"24 December, 2015"
|
||||
#define PDATE L"26 October, 2017"
|
||||
|
||||
#include "ansicon.h"
|
||||
#include "version.h"
|
||||
|
10
version.h
10
version.h
@ -2,11 +2,11 @@
|
||||
version.h - Version defines.
|
||||
*/
|
||||
|
||||
#define PVERS L"1.72" // wide string
|
||||
#define PVERSA "1.72" // ANSI string (windres 2.16.91 didn't like L)
|
||||
#define PVERE L"172" // wide environment string
|
||||
#define PVEREA "172" // ANSI environment string
|
||||
#define PVERB 1,7,2,0 // binary (resource)
|
||||
#define PVERS L"1.80" // wide string
|
||||
#define PVERSA "1.80" // ANSI string (windres 2.16.91 didn't like L)
|
||||
#define PVERE L"180" // wide environment string
|
||||
#define PVEREA "180" // ANSI environment string
|
||||
#define PVERB 1,8,0,0 // binary (resource)
|
||||
|
||||
#ifdef _WIN64
|
||||
# define BITS L"64"
|
||||
|
Loading…
x
Reference in New Issue
Block a user