Implement RtlInitAnsiStringEx.
This commit is contained in:
parent
c62e978d54
commit
a1cd3ab653
|
@ -650,6 +650,7 @@
|
|||
@ stdcall RtlImageRvaToVa(ptr long long ptr)
|
||||
@ stdcall RtlImpersonateSelf(long)
|
||||
@ stdcall RtlInitAnsiString(ptr str)
|
||||
@ stdcall RtlInitAnsiStringEx(ptr str)
|
||||
@ stub RtlInitCodePageTable
|
||||
# @ stub RtlInitMemoryStream
|
||||
@ stub RtlInitNlsTables
|
||||
|
|
|
@ -102,6 +102,39 @@ void WINAPI RtlInitAnsiString(
|
|||
else target->Length = target->MaximumLength = 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* RtlInitAnsiStringEx (NTDLL.@)
|
||||
*
|
||||
* Initializes a buffered ansi string.
|
||||
*
|
||||
* RETURNS
|
||||
* An appropriate NTSTATUS value.
|
||||
*
|
||||
* NOTES
|
||||
* Assigns source to target->Buffer. The length of source is assigned to
|
||||
* target->Length and target->MaximumLength. If source is NULL the length
|
||||
* of source is assumed to be 0.
|
||||
*/
|
||||
NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING target, PCSZ source)
|
||||
{
|
||||
if (source)
|
||||
{
|
||||
unsigned int len = strlen(source);
|
||||
if (len+1 > 0xffff)
|
||||
return STATUS_NAME_TOO_LONG;
|
||||
|
||||
target->Buffer = (PCHAR) source;
|
||||
target->Length = len;
|
||||
target->MaximumLength = len + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
target->Buffer = NULL;
|
||||
target->Length = 0;
|
||||
target->MaximumLength = 0;
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* RtlInitString (NTDLL.@)
|
||||
|
|
|
@ -2070,6 +2070,7 @@ PVOID WINAPI RtlImageRvaToVa(const IMAGE_NT_HEADERS *,HMODULE,DWORD,IMAGE_SE
|
|||
NTSTATUS WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
|
||||
void WINAPI RtlInitString(PSTRING,PCSZ);
|
||||
void WINAPI RtlInitAnsiString(PANSI_STRING,PCSZ);
|
||||
NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING,PCSZ);
|
||||
void WINAPI RtlInitUnicodeString(PUNICODE_STRING,PCWSTR);
|
||||
NTSTATUS WINAPI RtlInitUnicodeStringEx(PUNICODE_STRING,PCWSTR);
|
||||
NTSTATUS WINAPI RtlInitializeCriticalSection(RTL_CRITICAL_SECTION *);
|
||||
|
|
Loading…
Reference in New Issue