adapted RtlInt64ToUnicodeString() from RtlIntegerToUnicodeString()

svn path=/trunk/; revision=10845
This commit is contained in:
Thomas Bluemel 2004-09-13 17:27:23 +00:00
parent 40016817aa
commit 89c8c187f3

View file

@ -224,7 +224,7 @@ RtlCompareString(
{
if (CaseInsensitive)
{
while (1)
for(;;)
{
c1 = len1-- ? RtlUpperChar (*s1++) : 0;
c2 = len2-- ? RtlUpperChar (*s2++) : 0;
@ -234,7 +234,7 @@ RtlCompareString(
}
else
{
while (1)
for(;;)
{
c1 = len1-- ? *s1++ : 0;
c2 = len2-- ? *s2++ : 0;
@ -497,21 +497,6 @@ RtlInitUnicodeString(IN OUT PUNICODE_STRING DestinationString,
DestinationString->Buffer = (PWSTR)SourceString;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
RtlInt64ToUnicodeString (
IN ULONGLONG Value,
IN ULONG Base OPTIONAL,
IN OUT PUNICODE_STRING String
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @implemented
*
@ -643,14 +628,51 @@ RtlIntegerToUnicodeString(
Status = RtlIntegerToChar (Value,
Base,
33,
sizeof(Buffer),
Buffer);
if (!NT_SUCCESS(Status))
return Status;
AnsiString.Buffer = Buffer;
AnsiString.Length = strlen (Buffer);
AnsiString.MaximumLength = 33;
AnsiString.MaximumLength = sizeof(Buffer);
Status = RtlAnsiStringToUnicodeString (String,
&AnsiString,
FALSE);
return Status;
}
/*
* @implemented
*/
NTSTATUS
STDCALL
RtlInt64ToUnicodeString (
IN ULONGLONG Value,
IN ULONG Base OPTIONAL,
IN OUT PUNICODE_STRING String
)
{
LARGE_INTEGER LargeInt;
ANSI_STRING AnsiString;
CHAR Buffer[33];
NTSTATUS Status;
LargeInt.QuadPart = Value;
Status = RtlLargeIntegerToChar (&LargeInt,
Base,
sizeof(Buffer),
Buffer);
if (!NT_SUCCESS(Status))
return Status;
AnsiString.Buffer = Buffer;
AnsiString.Length = strlen (Buffer);
AnsiString.MaximumLength = sizeof(Buffer);
Status = RtlAnsiStringToUnicodeString (String,
&AnsiString,