ReactOS  0.4.15-dev-1197-g8081ba9
RtlIsNameLegalDOS8Dot3.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS API tests
3  * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4  * PURPOSE: Test for RtlIsNameLegalDOS8Dot3
5  * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include "precomp.h"
9 
11 {
13  CHAR OemNameBuffer[13];
16  BOOLEAN IsLegal;
17 
18  RtlInitUnicodeString(&Name, L"\x00ae");
19  RtlFillMemory(OemNameBuffer, sizeof(OemNameBuffer), 0x55);
20  OemName.Buffer = OemNameBuffer;
21  OemName.Length = 0;
22  OemName.MaximumLength = sizeof(OemNameBuffer);
23  NameContainsSpaces = 0x55;
25  ok(IsLegal == TRUE, "IsLegal = %u\n", IsLegal);
26  ok(NameContainsSpaces == FALSE, "NameContainsSpaces = %u\n", NameContainsSpaces);
27  ok(OemName.Length == 1, "OemName.Length = %u\n", OemName.Length);
28  ok(OemNameBuffer[0] == 'R', "OemNameBuffer[0] = 0x%x\n", OemNameBuffer[0]);
29  ok(OemNameBuffer[1] == 0x55, "OemNameBuffer[1] = 0x%x\n", OemNameBuffer[1]);
30  ok(OemNameBuffer[2] == 0x55, "OemNameBuffer[2] = 0x%x\n", OemNameBuffer[2]);
31 
32 }
BOOLEAN NTAPI RtlIsNameLegalDOS8Dot3(_In_ PUNICODE_STRING Name, _Inout_opt_ POEM_STRING OemName, _Inout_opt_ PBOOLEAN NameContainsSpaces)
_Inout_opt_ POEM_STRING _Out_opt_ PBOOLEAN NameContainsSpaces
Definition: rtlfuncs.h:3023
#define TRUE
Definition: types.h:120
char CHAR
Definition: xmlstorage.h:175
START_TEST(RtlIsNameLegalDOS8Dot3)
STRING OEM_STRING
Definition: umtypes.h:203
#define FALSE
Definition: types.h:117
struct NameRec_ * Name
Definition: cdprocs.h:459
unsigned char BOOLEAN
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:593
static const WCHAR L[]
Definition: oid.c:1250
#define ok(value,...)
Definition: atltest.h:57
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
IN PDCB IN POEM_STRING OemName
Definition: fatprocs.h:1303