mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 18:46:29 +00:00
adapted RtlInt64ToUnicodeString() from RtlIntegerToUnicodeString()
svn path=/trunk/; revision=10845
This commit is contained in:
parent
40016817aa
commit
89c8c187f3
1 changed files with 41 additions and 19 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue