From e2490a09866b5310c4baab73c7d982eda943fcb9 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 20 Apr 2004 01:07:23 +0000 Subject: [PATCH] Stub and documentation for RtlFormatMessage. --- dlls/ntdll/ntdll.spec | 2 +- dlls/ntdll/resource.c | 28 ++++++++++++++++++++++++++++ include/winternl.h | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 507953cdc5e..8559ed47d7a 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -423,7 +423,7 @@ @ stub RtlFirstEntrySList @ stdcall RtlFirstFreeAce(ptr ptr) @ stdcall RtlFormatCurrentUserKeyPath(ptr) -@ stub RtlFormatMessage +@ stdcall RtlFormatMessage(ptr long long long long ptr ptr long) @ stdcall RtlFreeAnsiString(long) @ stub RtlFreeHandle @ stdcall RtlFreeHeap(long long long) diff --git a/dlls/ntdll/resource.c b/dlls/ntdll/resource.c index 9458b35b25c..47499954338 100644 --- a/dlls/ntdll/resource.c +++ b/dlls/ntdll/resource.c @@ -399,6 +399,34 @@ NTSTATUS WINAPI RtlFindMessage( HMODULE hmod, ULONG type, ULONG lang, return STATUS_MESSAGE_NOT_FOUND; } +/********************************************************************** + * 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 *. + * Buffer [O] Buffer to store processed message in. + * BufferSize [I] Size of Buffer (in bytes?). + * + * RETURNS + * NTSTATUS code. + */ +NTSTATUS WINAPI RtlFormatMessage( LPWSTR Message, UCHAR MaxWidth, + BOOLEAN IgnoreInserts, BOOLEAN Ansi, + BOOLEAN ArgumentIsArray, va_list * Arguments, + LPWSTR Buffer, ULONG BufferSize ) +{ + FIXME("(%s, %u, %s, %s, %s, %p, %p, %ld)\n", debugstr_w(Message), + MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE", + ArgumentIsArray ? "TRUE" : "FALSE", Arguments, Buffer, BufferSize); + return STATUS_SUCCESS; +} + /********************************************************************** * NtQueryDefaultLocale (NTDLL.@) diff --git a/include/winternl.h b/include/winternl.h index 86ae5a59797..46a18679a85 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1322,6 +1322,7 @@ ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG); 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); void WINAPI RtlFreeAnsiString(PANSI_STRING); BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID); void WINAPI RtlFreeOemString(POEM_STRING);