54 memset(BufferU, 0xAA,
sizeof(BufferU));
55 memset(BufferOem, 0xAA,
sizeof(BufferOem));
66 ok(StringU.
Buffer == BufferU,
"Invalid buffer: %p\n", StringU.
Buffer);
68 StringOem.Buffer = BufferOem;
70 StringOem.MaximumLength = 10 *
sizeof(
CHAR);
72 Status = RtlUnicodeStringToCountedOemString(&StringOem, &StringU,
FALSE);
74 ok(StringOem.Length == 1 *
sizeof(
CHAR),
"Invalid size: %d\n", StringOem.Length);
75 ok(StringOem.MaximumLength == 10 *
sizeof(
CHAR),
"Invalid size: %d\n", StringOem.MaximumLength);
76 ok(StringOem.Buffer == BufferOem,
"Invalid buffer: %p\n", StringOem.Buffer);
78 ok(BufferOem[0] ==
'A',
"Unexpected first char 0x%02x for OEM string.\n", BufferOem[0]);
79 for (
i = 1;
i < 10; ++
i)
81 ok(BufferOem[
i] == (
CHAR)0xAA,
"Unexpected char 0x%02x at position %d.\n", BufferOem[
i],
i);
84 ok(
i == 10,
"String was not null terminated!\n");
90 StringOem.Buffer = BufferOem;
91 StringOem.MaximumLength = 1 *
sizeof(
CHAR);
93 memset(BufferOem, 0xAA,
sizeof(BufferOem));
95 Status = RtlUnicodeStringToCountedOemString(&StringOem, &StringU,
FALSE);
97 ok(StringOem.Length == 4 *
sizeof(
CHAR),
"Invalid size: %d\n", StringOem.Length);
98 ok(StringOem.MaximumLength == 1 *
sizeof(
CHAR),
"Invalid size: %d\n", StringOem.MaximumLength);
99 ok(StringOem.Buffer == BufferOem,
"Invalid buffer: %p\n", StringOem.Buffer);
101 for (
i = 0;
i < 10; ++
i)
103 ok(BufferOem[
i] == (
CHAR)0xAA,
"Unexpected char 0x%02x at position %d.\n", BufferOem[
i],
i);
113 StringOem.Buffer =
NULL;
114 StringOem.Length = 0;
115 StringOem.MaximumLength = 0;
120 ok_long(StringOem.MaximumLength, 0);
123 StringOem.MaximumLength = StringOem.Length;
124 StringOem.Length = 0;
133 RtlFreeHeap(RtlGetProcessHeap(), 0, StringOem.Buffer);
void SetupLocale(ULONG AnsiCode, ULONG OemCode, ULONG Unicode)
const UNICODE_STRING StrU
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define ok_ntstatus(status, expected)
#define ok_long(expression, result)
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define NT_SUCCESS(StatCode)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STATUS_UNMAPPABLE_CHARACTER
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
#define STATUS_BUFFER_OVERFLOW
#define RTL_CONSTANT_STRING(s)