ReactOS  0.4.14-dev-115-g4576127
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 
12 static struct
13 {
15  CHAR buffer[0xffff];
16 } data;
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 
83 
92 
95 
96  usDeviceName.Buffer = szName;
97  usDeviceName.Length = (USHORT)wcslen(szName);
98  usDeviceName.MaximumLength = usDeviceName.Length;
101 
102  Status = NtUserEnumDisplaySettings(&usDeviceName, 1000, (DEVMODEW*)&data, 123456);
104 
106 
107 }
static struct @1558 data
#define ERROR_SUCCESS
Definition: deptool.c:10
USHORT MaximumLength
Definition: env_spec_w32.h:370
char CHAR
Definition: xmlstorage.h:175
LONG NTSTATUS
Definition: precomp.h:26
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
GLuint buffer
Definition: glext.h:5915
int32_t INT
Definition: typedefs.h:56
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:64
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
smooth NULL
Definition: ftsmooth.c:416
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:462
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define TEST(x)
Definition: precomp.h:20
DEVMODEW devmode
START_TEST(NtUserEnumDisplaySettings)
#define SetLastError(x)
Definition: compat.h:409
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static const WCHAR L[]
Definition: oid.c:1250
#define STATUS_INVALID_PARAMETER_1
Definition: ntstatus.h:461
Status
Definition: gdiplustypes.h:24
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:228
unsigned short USHORT
Definition: pedump.c:61
static const WCHAR szName[]
Definition: msipriv.h:1194
struct _devicemodeW DEVMODEW
return STATUS_SUCCESS
Definition: btrfs.c:2966
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSTATUS NTAPI NtUserEnumDisplaySettings(PUNICODE_STRING lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode, DWORD dwFlags)