Author: tfaber
Date: Sun Mar 1 15:34:06 2015
New Revision: 66522
URL:
http://svn.reactos.org/svn/reactos?rev=66522&view=rev
Log:
[NTDLL:LDR]
- Implement LdrSetDllManifestProber
CORE-6354 CORE-9298
Modified:
trunk/reactos/dll/ntdll/ldr/ldrapi.c
trunk/reactos/dll/ntdll/ldr/ldrpe.c
trunk/reactos/include/ndk/ldrtypes.h
trunk/reactos/include/ndk/umfuncs.h
Modified: trunk/reactos/dll/ntdll/ldr/ldrapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrapi.c?rev…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/ldrapi.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/ldrapi.c [iso-8859-1] Sun Mar 1 15:34:06 2015
@@ -21,6 +21,7 @@
BOOLEAN LdrpShowRecursiveLoads, LdrpBreakOnRecursiveDllLoads;
UNICODE_STRING LdrApiDefaultExtension = RTL_CONSTANT_STRING(L".DLL");
ULONG AlternateResourceModuleCount;
+extern PLDR_MANIFEST_PROBER_ROUTINE LdrpManifestProberRoutine;
/* FUNCTIONS *****************************************************************/
@@ -69,9 +70,10 @@
VOID
NTAPI
-LdrSetDllManifestProber(IN PVOID ProberFunction)
-{
- UNIMPLEMENTED;
+LdrSetDllManifestProber(
+ _In_ PLDR_MANIFEST_PROBER_ROUTINE Routine)
+{
+ LdrpManifestProberRoutine = Routine;
}
BOOLEAN
Modified: trunk/reactos/dll/ntdll/ldr/ldrpe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrpe.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/ldrpe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/ldrpe.c [iso-8859-1] Sun Mar 1 15:34:06 2015
@@ -15,7 +15,7 @@
/* GLOBALS *******************************************************************/
-PVOID LdrpManifestProberRoutine;
+PLDR_MANIFEST_PROBER_ROUTINE LdrpManifestProberRoutine;
ULONG LdrpNormalSnap;
/* FUNCTIONS *****************************************************************/
Modified: trunk/reactos/include/ndk/ldrtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ldrtypes.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/ldrtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/ldrtypes.h [iso-8859-1] Sun Mar 1 15:34:06 2015
@@ -101,6 +101,11 @@
#define LDR_IS_DATAFILE(handle) (((ULONG_PTR)(handle)) & (ULONG_PTR)1)
#define LDR_IS_IMAGEMAPPING(handle) (((ULONG_PTR)(handle)) & (ULONG_PTR)2)
#define LDR_IS_RESOURCE(handle) (LDR_IS_IMAGEMAPPING(handle) ||
LDR_IS_DATAFILE(handle))
+
+//
+// Activation Context
+//
+typedef PVOID PACTIVATION_CONTEXT;
//
// Loader Data stored in the PEB
@@ -150,7 +155,7 @@
ULONG TimeDateStamp;
PVOID LoadedImports;
};
- PVOID EntryPointActivationContext;
+ PACTIVATION_CONTEXT EntryPointActivationContext;
PVOID PatchInformation;
} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
@@ -228,8 +233,14 @@
//
// Callback function for LdrEnumerateLoadedModules
//
-typedef VOID (NTAPI LDR_ENUM_CALLBACK)(IN PLDR_DATA_TABLE_ENTRY ModuleInformation, _In_
PVOID Parameter, _Out_ BOOLEAN *Stop);
+typedef VOID (NTAPI LDR_ENUM_CALLBACK)(_In_ PLDR_DATA_TABLE_ENTRY ModuleInformation, _In_
PVOID Parameter, _Out_ BOOLEAN *Stop);
typedef LDR_ENUM_CALLBACK *PLDR_ENUM_CALLBACK;
+
+//
+// Manifest prober routine set via LdrSetDllManifestProber
+//
+typedef NTSTATUS (NTAPI LDR_MANIFEST_PROBER_ROUTINE)(_In_ PVOID DllHandle, _In_ PCWSTR
FullDllName, _Out_ PVOID *ActCtx);
+typedef LDR_MANIFEST_PROBER_ROUTINE *PLDR_MANIFEST_PROBER_ROUTINE;
//
// DLL Main Routine
Modified: trunk/reactos/include/ndk/umfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/umfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/umfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/umfuncs.h [iso-8859-1] Sun Mar 1 15:34:06 2015
@@ -191,6 +191,11 @@
_Out_ PULONG ReturnedSize
);
+VOID
+NTAPI
+LdrSetDllManifestProber(
+ _In_ PLDR_MANIFEST_PROBER_ROUTINE Routine);
+
NTSTATUS
NTAPI
LdrShutdownProcess(