X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Ftools%2Fmkhive%2Frtl.c;fp=reactos%2Ftools%2Fmkhive%2Frtl.c;h=f2c84c7fdec3555dfc948f810e90c1e04a1eb77a;hp=4275cf358ba8918268a92b9f9ced5e5dad8c39f9;hb=660ad50bae6fa7415cdd391c5d58cd414aa25c58;hpb=30da982e368a5d48388c0de4e641ec9ad7b8508e diff --git a/reactos/tools/mkhive/rtl.c b/reactos/tools/mkhive/rtl.c index 4275cf358ba..f2c84c7fdec 100644 --- a/reactos/tools/mkhive/rtl.c +++ b/reactos/tools/mkhive/rtl.c @@ -17,34 +17,6 @@ #include "mkhive.h" #include -/* - * @implemented - * - * NOTES - * If source is NULL the length of source is assumed to be 0. - */ -VOID NTAPI -RtlInitAnsiString( - IN OUT PANSI_STRING DestinationString, - IN PCSTR SourceString) -{ - SIZE_T DestSize; - - if(SourceString) - { - DestSize = strlen(SourceString); - DestinationString->Length = (USHORT)DestSize; - DestinationString->MaximumLength = (USHORT)DestSize + sizeof(CHAR); - } - else - { - DestinationString->Length = 0; - DestinationString->MaximumLength = 0; - } - - DestinationString->Buffer = (PCHAR)SourceString; -} - /* * @implemented * @@ -73,41 +45,6 @@ RtlInitUnicodeString( DestinationString->Buffer = (PWCHAR)SourceString; } -NTSTATUS NTAPI -RtlAnsiStringToUnicodeString( - IN OUT PUNICODE_STRING UniDest, - IN PANSI_STRING AnsiSource, - IN BOOLEAN AllocateDestinationString) -{ - ULONG Length; - PUCHAR WideString; - USHORT i; - - Length = AnsiSource->Length * sizeof(WCHAR); - if (Length > MAXUSHORT) return STATUS_INVALID_PARAMETER_2; - UniDest->Length = (USHORT)Length; - - if (AllocateDestinationString) - { - UniDest->MaximumLength = (USHORT)Length + sizeof(WCHAR); - UniDest->Buffer = (PWSTR) malloc(UniDest->MaximumLength); - if (!UniDest->Buffer) - return STATUS_NO_MEMORY; - } - else if (UniDest->Length >= UniDest->MaximumLength) - { - return STATUS_BUFFER_OVERFLOW; - } - - WideString = (PUCHAR)UniDest->Buffer; - for (i = 0; i <= AnsiSource->Length; i++) - { - WideString[2 * i + 0] = AnsiSource->Buffer[i]; - WideString[2 * i + 1] = 0; - } - return STATUS_SUCCESS; -} - LONG NTAPI RtlCompareUnicodeString( IN PCUNICODE_STRING String1, @@ -222,14 +159,14 @@ RtlAssert(PVOID FailedAssertion, VOID NTAPI KeBugCheckEx( - IN ULONG BugCheckCode, + IN ULONG BugCheckCode, IN ULONG_PTR BugCheckParameter1, IN ULONG_PTR BugCheckParameter2, IN ULONG_PTR BugCheckParameter3, IN ULONG_PTR BugCheckParameter4) { char Buffer[70]; - printf("*** STOP: 0x%08lX (0x%08lX, 0x%08lX, 0x%08lX, 0x%08lX)", + printf("*** STOP: 0x%08X (0x%08lX, 0x%08lX, 0x%08lX, 0x%08lX)", BugCheckCode, BugCheckParameter1, BugCheckParameter2, BugCheckParameter3, BugCheckParameter4); ASSERT(FALSE);