Author: ion
Date: Sun Jan 15 03:16:00 2012
New Revision: 54968
URL:
http://svn.reactos.org/svn/reactos?rev=54968&view=rev
Log:
[NTDLL]: Add, export, and stubplement RtlComputeImportTableHash and document in NDK.
[NTDLL]: Use HANDLE instead of Win32 HKEY.
[NDK]: Add missing NtCreateProcessEx flags and some missing Ldr functions + missing
RtlGetFullPathName_UstrEx.
[CSRSS]: Define two new CSRSS messages (not implemented): UpdateVdmEntry and
GetVdmExitCode.
Modified:
trunk/reactos/dll/ntdll/def/ntdll.pspec
trunk/reactos/dll/ntdll/def/ntdll.spec
trunk/reactos/dll/ntdll/ldr/ldrinit.c
trunk/reactos/dll/ntdll/rtl/libsupp.c
trunk/reactos/include/ndk/pstypes.h
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/include/ndk/umfuncs.h
trunk/reactos/include/reactos/subsys/csrss/csrss.h
Modified: trunk/reactos/dll/ntdll/def/ntdll.pspec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.pspec?…
==============================================================================
--- trunk/reactos/dll/ntdll/def/ntdll.pspec [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/def/ntdll.pspec [iso-8859-1] Sun Jan 15 03:16:00 2012
@@ -485,7 +485,7 @@
@ stdcall RtlCompareUnicodeString (ptr ptr long)
@ stdcall RtlCompressBuffer(long ptr long ptr long long ptr ptr)
@ stdcall RtlComputeCrc32(long ptr long)
-//@ stdcall RtlComputeImportTableHash
+@ stdcall RtlComputeImportTableHash(ptr ptr long)
//@ stdcall RtlComputePrivatizedDllName_U
//@ stdcall RtlConsoleMultiByteToUnicodeN
@ stdcall RtlConvertExclusiveToShared(ptr)
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 Jan 15 03:16:00 2012
@@ -483,7 +483,7 @@
@ stdcall RtlCompareUnicodeString (ptr ptr long)
@ stdcall RtlCompressBuffer(long ptr long ptr long long ptr ptr)
@ stdcall RtlComputeCrc32(long ptr long)
-;@ stdcall RtlComputeImportTableHash
+@ stdcall RtlComputeImportTableHash(ptr ptr long)
;@ stdcall RtlComputePrivatizedDllName_U
;@ stdcall RtlConsoleMultiByteToUnicodeN
@ stdcall RtlConvertExclusiveToShared(ptr)
Modified: trunk/reactos/dll/ntdll/ldr/ldrinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrinit.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] Sun Jan 15 03:16:00 2012
@@ -18,8 +18,8 @@
/* GLOBALS *******************************************************************/
-HKEY ImageExecOptionsKey;
-HKEY Wow64ExecOptionsKey;
+HANDLE ImageExecOptionsKey;
+HANDLE Wow64ExecOptionsKey;
UNICODE_STRING ImageExecOptionsString =
RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\Microsoft\\Windows
NT\\CurrentVersion\\Image File Execution Options");
UNICODE_STRING Wow64OptionsString = RTL_CONSTANT_STRING(L"");
UNICODE_STRING NtDllString = RTL_CONSTANT_STRING(L"ntdll.dll");
@@ -104,9 +104,9 @@
NTAPI
LdrOpenImageFileOptionsKey(IN PUNICODE_STRING SubKey,
IN BOOLEAN Wow64,
- OUT PHKEY NewKeyHandle)
+ OUT PHANDLE NewKeyHandle)
{
- PHKEY RootKeyLocation;
+ PHANDLE RootKeyLocation;
HANDLE RootKey;
UNICODE_STRING SubKeyString;
OBJECT_ATTRIBUTES ObjectAttributes;
@@ -174,7 +174,7 @@
*/
NTSTATUS
NTAPI
-LdrQueryImageFileKeyOption(IN HKEY KeyHandle,
+LdrQueryImageFileKeyOption(IN HANDLE KeyHandle,
IN PCWSTR ValueName,
IN ULONG Type,
OUT PVOID Buffer,
@@ -345,7 +345,7 @@
IN BOOLEAN Wow64)
{
NTSTATUS Status;
- HKEY KeyHandle;
+ HANDLE KeyHandle;
/* Open a handle to the key */
Status = LdrOpenImageFileOptionsKey(SubKey, Wow64, &KeyHandle);
@@ -1326,10 +1326,10 @@
NTSTATUS
NTAPI
-LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PHKEY
OptionsKey)
+LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PHANDLE
OptionsKey)
{
NTSTATUS Status;
- HKEY KeyHandle;
+ HANDLE KeyHandle;
ULONG ExecuteOptions, MinimumStackCommit = 0, GlobalFlag;
/* Return error if we were not provided a pointer where to save the options key
handle */
@@ -1467,12 +1467,12 @@
PPEB Peb = NtCurrentPeb();
BOOLEAN IsDotNetImage = FALSE;
BOOLEAN FreeCurDir = FALSE;
- //HKEY CompatKey;
+ //HANDLE CompatKey;
PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
//LPWSTR ImagePathBuffer;
ULONG ConfigSize;
UNICODE_STRING CurrentDirectory;
- HKEY OptionsKey;
+ HANDLE OptionsKey;
ULONG HeapFlags;
PIMAGE_NT_HEADERS NtHeader;
LPWSTR NtDllName = NULL;
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 Jan 15 03:16:00 2012
@@ -562,4 +562,18 @@
return STATUS_NOT_IMPLEMENTED;
}
+/*
+ * @unimplemented
+ */
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlComputeImportTableHash(IN HANDLE FileHandle,
+ OUT PCHAR Hash,
+ IN ULONG ImporTTableHashSize)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
/* EOF */
Modified: trunk/reactos/include/ndk/pstypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/pstypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/pstypes.h [iso-8859-1] Sun Jan 15 03:16:00 2012
@@ -72,6 +72,15 @@
#define FLG_HEAP_PAGE_ALLOCS 0x02000000
#define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
#define FLG_VALID_BITS 0x07FFFFFF
+
+//
+// Flags for NtCreateProcessEx
+//
+#define PROCESS_CREATE_FLAGS_BREAKAWAY 0x00000001
+#define PROCESS_CREATE_FLAGS_NO_DEBUG_INHERIT 0x00000002
+#define PROCESS_CREATE_FLAGS_INHERIT_HANDLES 0x00000004
+#define PROCESS_CREATE_FLAGS_OVERRIDE_ADDRESS_SPACE 0x00000008
+#define PROCESS_CREATE_FLAGS_LARGE_PAGES 0x00000010
//
// Process priority classes
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 Jan 15 03:16:00 2012
@@ -2513,7 +2513,7 @@
RtlDosPathNameToRelativeNtPathName_U(
IN PCWSTR DosName,
OUT PUNICODE_STRING NtName,
- OUT PCWSTR * PartName,
+ OUT PCWSTR *PartName,
OUT PRTL_RELATIVE_NAME_U RelativeName
);
@@ -2543,6 +2543,19 @@
IN ULONG Size,
IN PWSTR Buffer,
OUT PWSTR *ShortName
+);
+
+ULONG
+NTAPI
+RtlGetFullPathName_UstrEx(
+ IN PUNICODE_STRING FileName,
+ IN PUNICODE_STRING StaticString,
+ IN PUNICODE_STRING DynamicString,
+ IN PUNICODE_STRING *StringUsed,
+ IN PSIZE_T FilePartSize,
+ OUT PBOOLEAN NameInvalid,
+ OUT RTL_PATH_TYPE* PathType,
+ OUT PULONG LengthNeeded
);
NTSYSAPI
@@ -3824,6 +3837,15 @@
RtlGUIDFromString(
IN PUNICODE_STRING GuidString,
OUT GUID *Guid);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+RtlComputeImportTableHash(
+ IN HANDLE hFile,
+ OUT PCHAR Hash,
+ IN ULONG ImportTableHashRevision
+);
#endif
#ifdef __cplusplus
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 Jan 15 03:16:00 2012
@@ -314,4 +314,23 @@
OUT PUSHORT ImageCharacterstics
);
+NTSTATUS
+NTAPI
+LdrOpenImageFileOptionsKey(
+ IN PUNICODE_STRING SubKey,
+ IN BOOLEAN Wow64,
+ OUT PHANDLE NewKeyHandle
+);
+
+NTSTATUS
+NTAPI
+LdrQueryImageFileKeyOption(
+ IN HANDLE KeyHandle,
+ IN PCWSTR ValueName,
+ IN ULONG Type,
+ OUT PVOID Buffer,
+ IN ULONG BufferSize,
+ OUT PULONG ReturnedLength OPTIONAL
+);
+
#endif
Modified: trunk/reactos/include/reactos/subsys/csrss/csrss.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/csr…
==============================================================================
--- trunk/reactos/include/reactos/subsys/csrss/csrss.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/csrss/csrss.h [iso-8859-1] Sun Jan 15 03:16:00
2012
@@ -529,6 +529,24 @@
{
ULONG VideoMode;
} CSRSS_SOUND_SENTRY, *PCSRSS_SOUND_SENTRY;
+
+typedef struct
+{
+ ULONG iTask;
+ ULONG BinaryType;
+ HANDLE ConsoleHandle;
+ HANDLE VDMProcessHandle;
+ HANDLE WaitObjectForParent;
+ USHORT EntryIndex;
+ USHORT VDMCreationState;
+} CSRSS_UPDATE_VDM_ENTRY, *PCSRSS_UPDATE_VDM_ENTRY;
+
+typedef struct
+{
+ HANDLE ConsoleHandle;
+ HANDLE hParent;
+ ULONG ExitCode;
+} CSRSS_GET_VDM_EXIT_CODE, *PCSRSS_GET_VDM_EXIT_CODE;
#define CSR_API_MESSAGE_HEADER_SIZE(Type) (FIELD_OFFSET(CSR_API_MESSAGE, Data) +
sizeof(Type))
#define CSRSS_MAX_WRITE_CONSOLE (LPC_MAX_DATA_LENGTH -
CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE))
@@ -612,6 +630,8 @@
#define GET_TEMP_FILE (0x48)
#define DEFINE_DOS_DEVICE (0X49)
#define SOUND_SENTRY (0x50)
+#define UPDATE_VDM_ENTRY (0x51)
+#define GET_VDM_EXIT_CODE (0x52)
/* Keep in sync with definition below. */
#define CSRSS_HEADER_SIZE (sizeof(PORT_MESSAGE) + sizeof(ULONG) + sizeof(NTSTATUS))
@@ -696,6 +716,8 @@
CSRSS_GET_TEMP_FILE GetTempFile;
CSRSS_DEFINE_DOS_DEVICE DefineDosDeviceRequest;
CSRSS_SOUND_SENTRY SoundSentryRequest;
+ CSRSS_UPDATE_VDM_ENTRY UpdateVdmEntry;
+ CSRSS_GET_VDM_EXIT_CODE GetVdmExitCode;
} Data;
} CSR_API_MESSAGE, *PCSR_API_MESSAGE;