Author: hbelusca
Date: Sat Nov 22 23:13:41 2014
New Revision: 65450
URL:
http://svn.reactos.org/svn/reactos?rev=65450&view=rev
Log:
[KERNEL32]
- Fix a misspelling.
[NTDLL]
- Fix the prototypes of RtlFormatMessageEx(Ex), this fixes strange apps kills when they
use FormatMessage[A/W] with win2k3 kernel32 (that uses internally RtlFormatMessage to do
the job).
Modified:
trunk/reactos/dll/ntdll/def/ntdll.spec
trunk/reactos/dll/win32/kernel32/client/proc.c
trunk/reactos/include/psdk/winternl.h
trunk/reactos/lib/rtl/message.c
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] Sat Nov 22 23:13:41 2014
@@ -630,8 +630,8 @@
@ stdcall RtlFirstFreeAce(ptr ptr)
@ stdcall RtlFlushSecureMemoryCache(ptr ptr)
@ stdcall RtlFormatCurrentUserKeyPath(ptr)
-@ stdcall RtlFormatMessage(ptr long long long long ptr ptr long)
-@ stdcall RtlFormatMessageEx(ptr long long long long ptr ptr long long)
+@ stdcall RtlFormatMessage(ptr long long long long ptr ptr long ptr)
+@ stdcall RtlFormatMessageEx(ptr long long long long ptr ptr long ptr long)
@ stdcall RtlFreeActivationContextStack(ptr)
@ stdcall RtlFreeAnsiString(long)
@ stdcall RtlFreeHandle(ptr ptr)
Modified: trunk/reactos/dll/win32/kernel32/client/proc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] Sat Nov 22 23:13:41 2014
@@ -3992,7 +3992,7 @@
if (!NT_SUCCESS(Status))
{
/* Bail out on failure */
- DPRINT1("Failed to reserved memory for VDM: %lx\n", Status);
+ DPRINT1("Failed to reserve memory for VDM: %lx\n", Status);
BaseSetLastNTError(Status);
Result = FALSE;
goto Quickie;
Modified: trunk/reactos/include/psdk/winternl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winternl.h?re…
==============================================================================
--- trunk/reactos/include/psdk/winternl.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winternl.h [iso-8859-1] Sat Nov 22 23:13:41 2014
@@ -2177,7 +2177,7 @@
ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
-NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list
*,LPWSTR,ULONG);
+NTSTATUS WINAPI RtlFormatMessage(PWSTR,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,va_list
*,PWSTR,ULONG,PULONG);
void WINAPI RtlFreeAnsiString(PANSI_STRING);
BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
Modified: trunk/reactos/lib/rtl/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/message.c?rev=6545…
==============================================================================
--- trunk/reactos/lib/rtl/message.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/message.c [iso-8859-1] Sat Nov 22 23:13:41 2014
@@ -20,11 +20,11 @@
NTSTATUS
NTAPI
RtlFindMessage(
- PVOID BaseAddress,
- ULONG Type,
- ULONG Language,
- ULONG MessageId,
- PMESSAGE_RESOURCE_ENTRY *MessageResourceEntry)
+ IN PVOID BaseAddress,
+ IN ULONG Type,
+ IN ULONG Language,
+ IN ULONG MessageId,
+ OUT PMESSAGE_RESOURCE_ENTRY* MessageResourceEntry)
{
LDR_RESOURCE_INFO ResourceInfo;
PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
@@ -122,41 +122,47 @@
return STATUS_SUCCESS;
}
+/*
+ * @unimplemented
+ */
NTSTATUS
NTAPI
RtlFormatMessageEx(
- PWSTR Message,
- UCHAR MaxWidth,
- BOOLEAN IgnoreInserts,
- BOOLEAN Ansi,
- BOOLEAN ArgumentIsArray,
- va_list *Arguments,
- PWSTR Buffer,
- ULONG BufferSize,
- ULONG Flags)
+ IN PWSTR Message,
+ IN ULONG MaxWidth OPTIONAL,
+ IN BOOLEAN IgnoreInserts,
+ IN BOOLEAN ArgumentsAreAnsi,
+ IN BOOLEAN ArgumentsAreAnArray,
+ IN va_list* Arguments,
+ OUT PWSTR Buffer,
+ IN ULONG BufferSize,
+ OUT PULONG ReturnLength OPTIONAL,
+ IN ULONG Flags)
{
- DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu %lx)\n",
- Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi
? "TRUE" : "FALSE",
- ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments,
Buffer, BufferSize, Flags);
+ DPRINT1("RtlFormatMessage(%S, %lu, %s, %s, %s, %p, %p, %lu, %p, %lx)\n",
+ Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE",
ArgumentsAreAnsi ? "TRUE" : "FALSE",
+ ArgumentsAreAnArray ? "TRUE" : "FALSE", Arguments,
Buffer, BufferSize,
+ ReturnLength, Flags);
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/**********************************************************************
- * RtlFormatMessage (NTDLL.@)
+ * RtlFormatMessage (NTDLL.@)
*
* Formats a message (similar to sprintf).
*
* PARAMS
- * Message [I] Message to format.
- * MaxWidth [I] Maximum width in characters of each output line.
- * IgnoreInserts [I] Whether to copy the message without processing inserts.
- * Ansi [I] Whether Arguments may have ANSI strings.
- * ArgumentsIsArray [I] Whether Arguments is actually an array rather than a va_list
*.
- * Arguments [I]
- * Buffer [O] Buffer to store processed message in.
- * BufferSize [I] Size of Buffer (in bytes?).
+ * Message [I] Message to format.
+ * MaxWidth [I] Maximum width in characters of each output line (optional).
+ * IgnoreInserts [I] Whether to copy the message without processing inserts.
+ * ArgumentsAreAnsi [I] Whether Arguments may have ANSI strings.
+ * ArgumentsAreAnArray [I] Whether Arguments is actually an array rather than a va_list
*.
+ * Arguments [I]
+ * Buffer [O] Buffer to store processed message in.
+ * BufferSize [I] Size of Buffer (in bytes).
+ * ReturnLength [O] Size of the formatted message (in bytes; optional).
*
* RETURNS
* NTSTATUS code.
@@ -166,16 +172,27 @@
NTSTATUS
NTAPI
RtlFormatMessage(
- PWSTR Message,
- UCHAR MaxWidth,
- BOOLEAN IgnoreInserts,
- BOOLEAN Ansi,
- BOOLEAN ArgumentIsArray,
- va_list *Arguments,
- PWSTR Buffer,
- ULONG BufferSize)
+ IN PWSTR Message,
+ IN ULONG MaxWidth OPTIONAL,
+ IN BOOLEAN IgnoreInserts,
+ IN BOOLEAN ArgumentsAreAnsi,
+ IN BOOLEAN ArgumentsAreAnArray,
+ IN va_list* Arguments,
+ OUT PWSTR Buffer,
+ IN ULONG BufferSize,
+ OUT PULONG ReturnLength OPTIONAL)
{
- return RtlFormatMessageEx(Message, MaxWidth, IgnoreInserts, Ansi, ArgumentIsArray,
Arguments, Buffer, BufferSize, 0);
+ /* Call the extended API */
+ return RtlFormatMessageEx(Message,
+ MaxWidth,
+ IgnoreInserts,
+ ArgumentsAreAnsi,
+ ArgumentsAreAnArray,
+ Arguments,
+ Buffer,
+ BufferSize,
+ ReturnLength,
+ 0);
}
/* EOF */