[NTDLL] Implement LdrInitShimEngineDynamic.

This is the final step required to properly support SE_DynamicShim
CORE-13283
This commit is contained in:
Mark Jansen 2017-02-25 13:33:15 +01:00
parent b544640c29
commit 15d491fb29
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 20 additions and 1 deletions

View file

@ -156,7 +156,7 @@
@ stdcall LdrGetProcedureAddress(ptr ptr long ptr)
@ stdcall -stub -version=0x600+ LdrGetProcedureAddressEx(ptr ptr long ptr long)
@ stdcall -stub LdrHotPatchRoutine(ptr)
@ stdcall -stub LdrInitShimEngineDynamic(ptr)
@ stdcall LdrInitShimEngineDynamic(ptr)
@ stdcall LdrInitializeThunk(long long long long)
@ stdcall LdrLoadAlternateResourceModule(ptr ptr)
@ stub -version=0x600+ LdrLoadAlternateResourceModuleEx

View file

@ -1672,4 +1672,23 @@ LdrSetAppCompatDllRedirectionCallback(
return STATUS_NOT_IMPLEMENTED;
}
BOOLEAN
NTAPI
LdrInitShimEngineDynamic(IN PVOID BaseAddress)
{
ULONG_PTR Cookie;
NTSTATUS Status = LdrLockLoaderLock(0, NULL, &Cookie);
if (NT_SUCCESS(Status))
{
if (!g_pShimEngineModule)
{
g_pShimEngineModule = BaseAddress;
LdrpGetShimEngineInterface();
}
LdrUnlockLoaderLock(0, Cookie);
return TRUE;
}
return FALSE;
}
/* EOF */