ReactOS  0.4.15-dev-2700-g4b4ffa9
rtlstr.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS user32.dll
3  * FILE: win32ss/user/user32/misc/rtlstr.c
4  * PURPOSE: Large Strings
5  * PROGRAMMER:
6  * UPDATE HISTORY:
7  *
8  */
9 
10 /* INCLUDES ******************************************************************/
11 
12 #include <user32.h>
13 
14 /* FUNCTIONS *****************************************************************/
15 VOID
16 NTAPI
19  IN INT Unknown)
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 }
38 
39 VOID
40 NTAPI
43  IN INT Unknown)
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 }
62 
63 BOOL
64 NTAPI
67 {
69 
72  {
75  }
76  else if (DestinationString && SourceString)
77  {
79  }
80  else
81  return FALSE;
82 }
CONST char * PCSZ
Definition: umtypes.h:125
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
static CHAR(WINAPI *pRtlUpperChar)(CHAR)
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define TRUE
Definition: types.h:120
uint16_t * PWSTR
Definition: typedefs.h:56
unsigned short Length
Definition: sprintf.c:451
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:58
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
void * Buffer
Definition: sprintf.c:453
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1868
VOID NTAPI RtlInitLargeAnsiString(IN OUT PLARGE_ANSI_STRING DestinationString, IN PCSZ SourceString, IN INT Unknown)
Definition: rtlstr.c:17
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1868
static int *static WCHAR(WINAPI *pRtlUpcaseUnicodeChar)(WCHAR)
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
BOOL NTAPI RtlLargeStringToUnicodeString(PUNICODE_STRING DestinationString, PLARGE_STRING SourceString)
Definition: rtlstr.c:67
#define NULL
Definition: types.h:112
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
VOID NTAPI RtlInitLargeUnicodeString(IN OUT PLARGE_UNICODE_STRING DestinationString, IN PCWSTR SourceString, IN INT Unknown)
Definition: rtlstr.c:42
#define OUT
Definition: typedefs.h:40
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
unsigned short MaximumLength
Definition: sprintf.c:452
static PCHAR
Definition: rtlstr.c:59