ReactOS 0.4.16-dev-250-g3ecd236
rtlstr.c File Reference
#include <user32.h>
Include dependency graph for rtlstr.c:

Go to the source code of this file.

Functions

VOID NTAPI RtlInitLargeAnsiString (IN OUT PLARGE_ANSI_STRING DestinationString, IN PCSZ SourceString, IN INT Unknown)
 
VOID NTAPI RtlInitLargeUnicodeString (IN OUT PLARGE_UNICODE_STRING DestinationString, IN PCWSTR SourceString, IN INT Unknown)
 
BOOL NTAPI RtlLargeStringToUnicodeString (PUNICODE_STRING DestinationString, PLARGE_STRING SourceString)
 

Function Documentation

◆ RtlInitLargeAnsiString()

VOID NTAPI RtlInitLargeAnsiString ( IN OUT PLARGE_ANSI_STRING  DestinationString,
IN PCSZ  SourceString,
IN INT  Unknown 
)

Definition at line 17 of file rtlstr.c.

20{
21 ULONG DestSize;
22
23 if (SourceString)
24 {
25 DestSize = strlen(SourceString);
26 DestinationString->Length = DestSize;
27 DestinationString->MaximumLength = DestSize + sizeof(CHAR);
28 }
29 else
30 {
33 }
34
36 DestinationString->bAnsi = TRUE;
37}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define CHAR(Char)
#define TRUE
Definition: types.h:120
#define PCHAR
Definition: match.c:90
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1922
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1921
unsigned short Length
Definition: sprintf.c:451
void * Buffer
Definition: sprintf.c:453
unsigned short MaximumLength
Definition: sprintf.c:452
uint32_t ULONG
Definition: typedefs.h:59

◆ RtlInitLargeUnicodeString()

VOID NTAPI RtlInitLargeUnicodeString ( IN OUT PLARGE_UNICODE_STRING  DestinationString,
IN PCWSTR  SourceString,
IN INT  Unknown 
)

Definition at line 41 of file rtlstr.c.

44{
45 ULONG DestSize;
46
47 if (SourceString)
48 {
49 DestSize = wcslen(SourceString) * sizeof(WCHAR);
50 DestinationString->Length = DestSize;
51 DestinationString->MaximumLength = DestSize + sizeof(WCHAR);
52 }
53 else
54 {
57 }
58
60 DestinationString->bAnsi = FALSE;
61}
#define FALSE
Definition: types.h:117
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
uint16_t * PWSTR
Definition: typedefs.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ RtlLargeStringToUnicodeString()

BOOL NTAPI RtlLargeStringToUnicodeString ( PUNICODE_STRING  DestinationString,
PLARGE_STRING  SourceString 
)

Definition at line 65 of file rtlstr.c.

67{
69
72 {
75 }
77 {
79 }
80 else
81 return FALSE;
82}
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
@ AnsiString
Definition: dnslib.h:19
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
char * LPSTR
Definition: xmlstorage.h:182

Referenced by NtUserDefSetText().