mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
[APPHELP] Stop shimeng being initialized multiple times
This is a hack, but is required when MSI is loaded in a process that is already shimmed. It should be removed when the MSI shim integration is fixed. CORE-18532 CORE-13283
This commit is contained in:
parent
21e68b0dba
commit
d284c81494
1 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,7 @@ static UNICODE_STRING g_LoadingShimDll;
|
|||
ULONG g_ShimEngDebugLevel = 0xffffffff;
|
||||
BOOL g_bComPlusImage = FALSE;
|
||||
BOOL g_bShimDuringInit = FALSE;
|
||||
BOOL g_bShimEngInitialized = FALSE;
|
||||
BOOL g_bInternalHooksUsed = FALSE;
|
||||
static ARRAY g_pShimInfo; /* PSHIMMODULE */
|
||||
static ARRAY g_pHookArray; /* HOOKMODULEINFO */
|
||||
|
@ -1358,6 +1359,7 @@ VOID SeiInit(LPCWSTR ProcessImage, HSDB hsdb, SDBQUERYRESULT* pQuery, BOOLEAN Pr
|
|||
/* Remove the 'LDRP_ENTRY_PROCESSED' flag from entries we modified, so that the loader can continue to process them */
|
||||
SeiResetEntryProcessed(Peb);
|
||||
}
|
||||
g_bShimEngInitialized = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1484,6 +1486,12 @@ LdrInitShimEngineDynamic(IN PVOID BaseAddress);
|
|||
|
||||
BOOL WINAPI SE_DynamicShim(LPCWSTR ProcessImage, HSDB hsdb, PVOID pQueryResult, LPCSTR Module, LPDWORD lpdwDynamicToken)
|
||||
{
|
||||
if (g_bShimEngInitialized)
|
||||
{
|
||||
SHIMENG_MSG("ReactOS HACK(CORE-13283): ShimEng already initialized!\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_bShimDuringInit = TRUE;
|
||||
SeiInit(ProcessImage, hsdb, pQueryResult, FALSE);
|
||||
g_bShimDuringInit = FALSE;
|
||||
|
|
Loading…
Reference in a new issue