From 6f267c1f3c6083c5f4560e7818510bc812732a0b Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 11 Aug 2004 09:30:23 +0000 Subject: [PATCH] Add RtlFormatMessage stub. svn path=/trunk/; revision=10497 --- reactos/lib/ntdll/def/ntdll.def | 10 +++---- reactos/lib/ntdll/def/ntdll.edf | 8 +++--- reactos/lib/ntdll/rtl/message.c | 51 ++++++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 16 deletions(-) diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index c545ab9e4a8..bedcf24c562 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -1,4 +1,4 @@ -; $Id: ntdll.def,v 1.126 2004/08/09 18:17:22 jimtabor Exp $ +; $Id: ntdll.def,v 1.127 2004/08/11 09:30:23 ekohl Exp $ ; ; ReactOS Operating System ; @@ -163,9 +163,9 @@ NtPrivilegedServiceAuditAlarm@20 NtPrivilegeObjectAuditAlarm@24 NtProtectVirtualMemory@20 NtPulseEvent@8 -NtQueryAttributesFile@8 -NtQueryDefaultLocale@8 -NtQueryDirectoryFile@44 +NtQueryAttributesFile@8 +NtQueryDefaultLocale@8 +NtQueryDirectoryFile@44 NtQueryDirectoryObject@28 NtQueryEaFile@36 NtQueryEvent@20 @@ -437,7 +437,7 @@ RtlFindSetBitsAndClear@12 RtlFirstFreeAce@8 ;RtlFlushPropertySet RtlFormatCurrentUserKeyPath@4 -;RtlFormatMessage@36 +RtlFormatMessage@32 RtlFreeAnsiString@4 RtlFreeHandle@8 RtlFreeHeap@12 diff --git a/reactos/lib/ntdll/def/ntdll.edf b/reactos/lib/ntdll/def/ntdll.edf index aeb1b32ae9d..781a9ef3c30 100644 --- a/reactos/lib/ntdll/def/ntdll.edf +++ b/reactos/lib/ntdll/def/ntdll.edf @@ -1,4 +1,4 @@ -; $Id: ntdll.edf,v 1.116 2004/08/09 18:17:22 jimtabor Exp $ +; $Id: ntdll.edf,v 1.117 2004/08/11 09:30:23 ekohl Exp $ ; ; ReactOS Operating System ; @@ -372,7 +372,6 @@ RtlDeleteAce=RtlDeleteAce@8 RtlDeleteAtomFromAtomTable=RtlDeleteAtomFromAtomTable@8 RtlDeleteCriticalSection=RtlDeleteCriticalSection@4 RtlDuplicateUnicodeString=RtlDuplicateUnicodeString@12 -RtlSetCriticalSectionSpinCount=RtlSetCriticalSectionSpinCount@8 ;RtlDeleteElementGenericTable ;RtlDeleteNoSplay RtlDeleteOwnersRanges=RtlDeleteOwnersRanges@8 @@ -437,7 +436,7 @@ RtlFindSetBitsAndClear=RtlFindSetBitsAndClear@12 RtlFirstFreeAce=RtlFirstFreeAce@8 ;RtlFlushPropertySet RtlFormatCurrentUserKeyPath=RtlFormatCurrentUserKeyPath@4 -;RtlFormatMessage +RtlFormatMessage=RtlFormatMessage@32 RtlFreeAnsiString=RtlFreeAnsiString@4 RtlFreeHandle=RtlFreeHandle@8 RtlFreeHeap=RtlFreeHeap@12 @@ -555,7 +554,7 @@ RtlQueryProcessDebugInformation=RtlQueryProcessDebugInformation@12 ;RtlQueryPropertyNames ;RtlQueryPropertySet RtlQueryRegistryValues=RtlQueryRegistryValues@20 -;RtlQuerySecutityObject +;RtlQuerySecurityObject ;RtlQueryTagHeap RtlQueryTimeZoneInformation=RtlQueryTimeZoneInformation@4 RtlRaiseException=RtlRaiseException@4 @@ -577,6 +576,7 @@ RtlSelfRelativeToAbsoluteSD=RtlSelfRelativeToAbsoluteSD@44 RtlSetAllBits=RtlSetAllBits@4 ;RtlSetAttributesSecurityDescriptor RtlSetBits=RtlSetBits@12 +RtlSetCriticalSectionSpinCount=RtlSetCriticalSectionSpinCount@8 RtlSetCurrentDirectory_U=RtlSetCurrentDirectory_U@4 RtlSetCurrentEnvironment=RtlSetCurrentEnvironment@8 RtlSetDaclSecurityDescriptor=RtlSetDaclSecurityDescriptor@16 diff --git a/reactos/lib/ntdll/rtl/message.c b/reactos/lib/ntdll/rtl/message.c index 1500a463fcd..d4d8a0f9216 100644 --- a/reactos/lib/ntdll/rtl/message.c +++ b/reactos/lib/ntdll/rtl/message.c @@ -1,10 +1,10 @@ -/* $Id: message.c,v 1.6 2004/07/03 17:40:23 navaraf Exp $ +/* $Id: message.c,v 1.7 2004/08/11 09:30:04 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Message table functions * FILE: lib/ntdll/rtl/message.c - * PROGRAMER: Eric Kohl + * PROGRAMER: Eric Kohl * REVISION HISTORY: * 29/05/2001: Created */ @@ -19,6 +19,9 @@ /* FUNCTIONS *****************************************************************/ +/* + * @implemented + */ NTSTATUS STDCALL RtlFindMessage(PVOID BaseAddress, ULONG Type, @@ -46,7 +49,7 @@ RtlFindMessage(PVOID BaseAddress, &ResourceDataEntry); if (!NT_SUCCESS(Status)) { - return(Status); + return Status; } DPRINT("ResourceDataEntry: %p\n", ResourceDataEntry); @@ -57,7 +60,7 @@ RtlFindMessage(PVOID BaseAddress, NULL); if (!NT_SUCCESS(Status)) { - return(Status); + return Status; } DPRINT("MessageTable: %p\n", MessageTable); @@ -112,12 +115,46 @@ RtlFindMessage(PVOID BaseAddress, *MessageResourceEntry = MessageEntry; } - return(STATUS_SUCCESS); + return STATUS_SUCCESS; } -/* -RtlFormatMessage +/********************************************************************** + * 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?). + * + * RETURNS + * NTSTATUS code. + * + * @unimplemented */ +NTSTATUS STDCALL +RtlFormatMessage(PWSTR Message, + UCHAR MaxWidth, + BOOLEAN IgnoreInserts, + BOOLEAN Ansi, + BOOLEAN ArgumentIsArray, + va_list *Arguments, + PWSTR Buffer, + ULONG BufferSize) +{ + DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu)\n", + Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE", + ArgumentIsArray ? "TRUE" : "FALSE", Arguments, Buffer, BufferSize); + + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} /* EOF */