ReactOS 0.4.16-dev-329-g9223134
NtUserEnumDisplaySettings.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for NtUserEnumDisplaySettings
5 * PROGRAMMERS:
6 */
7
8#include "../win32nt.h"
9
10
11
12static struct
13{
15 CHAR buffer[0xffff];
17
19{
20 UNICODE_STRING usDeviceName;
21 WCHAR szName[] = L"DISPLAY";
23 INT i;
24
29
30 data.devmode.dmDriverExtra = 0;
31 for (i = 0; i < 2 * sizeof(DEVMODEW); i++)
32 {
33 data.devmode.dmSize = i;
35 if (i != sizeof(DEVMODEW))
36 {
38 }
39 }
41
42 usDeviceName.Buffer = NULL;
43 usDeviceName.Length = 0;
44 usDeviceName.MaximumLength = 0;
47 Status = NtUserEnumDisplaySettings(&usDeviceName, -4, (DEVMODEW*)&data, 0);
49
50 data.devmode.dmSize = sizeof(DEVMODEW);
51 data.devmode.dmDriverExtra = 0xffff;
54
55 data.devmode.dmSize = sizeof(DEVMODEW);
56 data.devmode.dmDriverExtra = 0;
59
60 usDeviceName.Buffer = NULL;
61 usDeviceName.Length = 0;
62 usDeviceName.MaximumLength = 0;
65 Status = NtUserEnumDisplaySettings(&usDeviceName, -4, (DEVMODEW*)&data, 0);
67
78
79 /* iModeNum out of range */
82
83 /* Secret values? */
88
89 /* What's going on here? */
94
97
98 usDeviceName.Buffer = szName;
99 usDeviceName.Length = (USHORT)wcslen(szName);
100 usDeviceName.MaximumLength = usDeviceName.Length;
103
104 Status = NtUserEnumDisplaySettings(&usDeviceName, 1000, (DEVMODEW*)&data, 123456);
106
108
109}
static struct @1613 data
DEVMODEW devmode
#define ok_ntstatus(status, expected)
Definition: atltest.h:135
#define START_TEST(x)
Definition: atltest.h:75
LONG NTSTATUS
Definition: precomp.h:26
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define SetLastError(x)
Definition: compat.h:752
Status
Definition: gdiplustypes.h:25
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint buffer
Definition: glext.h:5915
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
Definition: glfuncs.h:248
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSTATUS NTAPI NtUserEnumDisplaySettings(PUNICODE_STRING lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode, DWORD dwFlags)
#define TEST(x)
Definition: precomp.h:20
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:476
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define STATUS_INVALID_PARAMETER_1
Definition: ntstatus.h:475
#define STATUS_INVALID_PARAMETER_3
Definition: ntstatus.h:477
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
static const WCHAR szName[]
Definition: powrprof.c:45
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
USHORT MaximumLength
Definition: env_spec_w32.h:370
int32_t INT
Definition: typedefs.h:58
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
struct _devicemodeW DEVMODEW
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175