Author: ion
Date: Sun Nov 6 01:34:06 2011
New Revision: 54307
URL:
http://svn.reactos.org/svn/reactos?rev=54307&view=rev
Log:
[NTDLL]: Export RtlImageNtHeaderEx and LodrLoadAlternateResourceModule.
[NDK]: Add LdrLoadAlternateResourceModule. Fix RtlDosApplyFileIsolationRedirection_UStr
and add flags.
[NTDLL]: Halfplement LdrLoad/UnloadAlternateResourceModule.
Modified:
trunk/reactos/dll/ntdll/def/ntdll.spec
trunk/reactos/dll/ntdll/ldr/ldrapi.c
trunk/reactos/dll/ntdll/rtl/libsupp.c
trunk/reactos/include/ndk/ldrfuncs.h
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/include/ndk/rtltypes.h
Modified: trunk/reactos/dll/ntdll/def/ntdll.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.spec?r…
==============================================================================
--- trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] Sun Nov 6 01:34:06 2011
@@ -88,7 +88,7 @@
;@ stdcall LdrHotPatchRoutine
;@ stdcall LdrInitShimEngineDynamic
@ stdcall LdrInitializeThunk(long long long long)
-;@ stdcall LdrLoadAlternateResourceModule
+@ stdcall LdrLoadAlternateResourceModule(ptr ptr)
@ stdcall LdrLoadDll(wstr long ptr ptr)
@ stdcall LdrLockLoaderLock(long ptr ptr)
;@ stdcall LdrOpenImageFileOptionsKey ; 5.2 SP1 and higher
@@ -566,7 +566,7 @@
@ stdcall RtlDllShutdownInProgress()
@ stdcall RtlDnsHostNameToComputerName(ptr ptr long)
@ stdcall RtlDoesFileExists_U(wstr)
-;@ stdcall RtlDosApplyFileIsolationRedirection_Ustr
+@ stdcall RtlDosApplyFileIsolationRedirection_Ustr(long ptr ptr ptr ptr ptr ptr ptr ptr)
@ stdcall RtlDosPathNameToNtPathName_U(wstr ptr ptr ptr)
;@ stdcall RtlDosPathNameToNtPathName_U_WithStatus ; 5.2 SP1, and higher
@ stdcall RtlDosPathNameToRelativeNtPathName_U(ptr ptr ptr ptr) ; CHECKME
@@ -690,7 +690,7 @@
@ stdcall RtlIdentifierAuthoritySid(ptr)
@ stdcall RtlImageDirectoryEntryToData(long long long ptr)
@ stdcall RtlImageNtHeader(long)
-;@ stdcall RtlImageNtHeaderEx
+@ stdcall RtlImageNtHeaderEx(long ptr double ptr)
@ stdcall RtlImageRvaToSection(ptr long long)
@ stdcall RtlImageRvaToVa(ptr long long ptr)
@ stdcall RtlImpersonateSelf(long)
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 Nov 6 01:34:06 2011
@@ -19,8 +19,17 @@
LONG LdrpLoaderLockAcquisitonCount;
BOOLEAN LdrpShowRecursiveLoads, LdrpBreakOnRecursiveDllLoads;
UNICODE_STRING LdrApiDefaultExtension = RTL_CONSTANT_STRING(L".DLL");
+ULONG AlternateResourceModuleCount;
/* FUNCTIONS *****************************************************************/
+
+BOOLEAN
+NTAPI
+LdrAlternateResourcesEnabled(VOID)
+{
+ /* ReactOS does not support this */
+ return FALSE;
+}
ULONG_PTR
FORCEINLINE
@@ -1524,15 +1533,46 @@
}
/*
- * @unimplemented
+ * @implemented
*/
BOOLEAN
NTAPI
LdrUnloadAlternateResourceModule(IN PVOID BaseAddress)
{
- //static BOOLEAN WarnedOnce = FALSE;
- //if (WarnedOnce == FALSE) { UNIMPLEMENTED; WarnedOnce = TRUE; }
- return FALSE;
-}
-
+ ULONG_PTR Cookie;
+
+ /* Acquire the loader lock */
+ LdrLockLoaderLock(TRUE, NULL, &Cookie);
+
+ /* Check if there's any alternate resources loaded */
+ if (AlternateResourceModuleCount)
+ {
+ UNIMPLEMENTED;
+ }
+
+ /* Release the loader lock */
+ LdrUnlockLoaderLock(1, Cookie);
+
+ /* All done */
+ return TRUE;
+}
+
+/* FIXME: Add to ntstatus.mc */
+#define STATUS_MUI_FILE_NOT_FOUND ((NTSTATUS)0xC00B0001L)
+
+/*
+ * @implemented
+ */
+NTSTATUS
+NTAPI
+LdrLoadAlternateResourceModule(IN PVOID Module,
+ IN PWSTR Buffer)
+{
+ /* Is MUI Support enabled? */
+ if (!LdrAlternateResourcesEnabled()) return STATUS_SUCCESS;
+
+ UNIMPLEMENTED;
+ return STATUS_MUI_FILE_NOT_FOUND;
+}
+
/* EOF */
Modified: trunk/reactos/dll/ntdll/rtl/libsupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/rtl/libsupp.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] Sun Nov 6 01:34:06 2011
@@ -518,21 +518,21 @@
return ImageBase;
}
+/*
+ * @unimplemented
+ */
NTSYSAPI
NTSTATUS
NTAPI
-RtlDosApplyFileIsolationRedirection_Ustr(
- IN BOOLEAN Unknown,
- IN PUNICODE_STRING OriginalName,
- IN PUNICODE_STRING Extension,
- IN OUT PUNICODE_STRING RedirectedName,
- IN OUT PUNICODE_STRING RedirectedName2,
- IN OUT PUNICODE_STRING *OriginalName2,
- IN PVOID Unknown1,
- IN PVOID Unknown2,
- IN PVOID Unknown3
-)
+RtlDosApplyFileIsolationRedirection_Ustr(IN ULONG Flags,
+ IN PUNICODE_STRING OriginalName,
+ IN PUNICODE_STRING Extension,
+ IN OUT PUNICODE_STRING StaticString,
+ IN OUT PUNICODE_STRING DynamicString,
+ IN OUT PUNICODE_STRING *NewName,
+ IN PULONG NewFlags,
+ IN PSIZE_T FileNameSize,
+ IN PSIZE_T RequiredLength)
{
return STATUS_SXS_KEY_NOT_FOUND;
}
-
Modified: trunk/reactos/include/ndk/ldrfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ldrfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/ldrfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/ldrfuncs.h [iso-8859-1] Sun Nov 6 01:34:06 2011
@@ -56,6 +56,13 @@
IN PLDR_RESOURCE_INFO ResourceInfo,
IN ULONG Level,
OUT PIMAGE_RESOURCE_DIRECTORY *ResourceDirectory
+);
+
+NTSTATUS
+NTAPI
+LdrLoadAlternateResourceModule(
+ IN PVOID Module,
+ IN PWSTR Buffer
);
BOOLEAN
Modified: trunk/reactos/include/ndk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Sun Nov 6 01:34:06 2011
@@ -3275,15 +3275,15 @@
NTSTATUS
NTAPI
RtlDosApplyFileIsolationRedirection_Ustr(
- IN BOOLEAN Unknown,
+ IN ULONG Flags,
IN PUNICODE_STRING OriginalName,
IN PUNICODE_STRING Extension,
- IN OUT PUNICODE_STRING RedirectedName,
- IN OUT PUNICODE_STRING RedirectedName2,
- IN OUT PUNICODE_STRING *OriginalName2,
- IN PVOID Unknown1,
- IN PVOID Unknown2,
- IN PVOID Unknown3
+ IN OUT PUNICODE_STRING StaticString,
+ IN OUT PUNICODE_STRING DynamicString,
+ IN OUT PUNICODE_STRING *NewName,
+ IN PULONG NewFlags,
+ IN PSIZE_T FileNameSize,
+ IN PSIZE_T RequiredLength
);
NTSYSAPI
Modified: trunk/reactos/include/ndk/rtltypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] Sun Nov 6 01:34:06 2011
@@ -250,6 +250,11 @@
// RtlImageNtHeaderEx Flags
//
#define RTL_IMAGE_NT_HEADER_EX_FLAG_NO_RANGE_CHECK 0x00000001
+
+//
+// RtlDosApplyFileIsolationRedirection_Ustr Flags
+//
+#define RTL_DOS_APPLY_FILE_REDIRECTION_USTR_FLAG_RESPECT_DOT_LOCAL 0x01
//
// Codepages