ReactOS 0.4.15-dev-8231-g29a56f3
display.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS user32.dll
3 * FILE: win32ss/user/user32/misc/display.c
4 * PURPOSE: DDE
5 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
6 */
7
8#include <user32.h>
9
11
12#define SIZEOF_DEVMODEA_300 124
13#define SIZEOF_DEVMODEA_400 148
14#define SIZEOF_DEVMODEA_500 156
15#define SIZEOF_DEVMODEW_300 188
16#define SIZEOF_DEVMODEW_400 212
17#define SIZEOF_DEVMODEW_500 220
18
19/*
20 * @implemented
21 */
24 LPCSTR lpDevice,
25 DWORD iDevNum,
26 PDISPLAY_DEVICEA lpDisplayDevice,
28{
29 BOOL rc;
31 DISPLAY_DEVICEW DisplayDeviceW;
32
34 {
36 return FALSE;
37 }
38
39 RtlZeroMemory(&DisplayDeviceW, sizeof(DISPLAY_DEVICEW));
40 DisplayDeviceW.cb = sizeof(DISPLAY_DEVICEW);
42 iDevNum,
43 &DisplayDeviceW,
44 dwFlags);
45 if (rc)
46 {
47 /* Copy result from DisplayDeviceW to lpDisplayDevice. Buffers have the same size so result is always NULL terminated. */
48 lpDisplayDevice->StateFlags = DisplayDeviceW.StateFlags;
49 WideCharToMultiByte(CP_ACP, 0, DisplayDeviceW.DeviceName, -1,
50 lpDisplayDevice->DeviceName,
51 sizeof(lpDisplayDevice->DeviceName) / sizeof(lpDisplayDevice->DeviceName[0]),
52 NULL, NULL);
53 WideCharToMultiByte(CP_ACP, 0, DisplayDeviceW.DeviceString, -1,
54 lpDisplayDevice->DeviceString,
55 sizeof(lpDisplayDevice->DeviceString) / sizeof(lpDisplayDevice->DeviceString[0]),
56 NULL, NULL);
57 WideCharToMultiByte(CP_ACP, 0, DisplayDeviceW.DeviceID, -1,
58 lpDisplayDevice->DeviceID,
59 sizeof(lpDisplayDevice->DeviceID) / sizeof(lpDisplayDevice->DeviceID[0]),
60 NULL, NULL);
61 WideCharToMultiByte(CP_ACP, 0, DisplayDeviceW.DeviceKey, -1,
62 lpDisplayDevice->DeviceKey,
63 sizeof(lpDisplayDevice->DeviceKey) / sizeof(lpDisplayDevice->DeviceKey[0]),
64 NULL, NULL);
65 }
66
68
69 return rc;
70}
71
72
73/*
74 * @implemented
75 */
76BOOL
79 LPCWSTR lpDevice,
80 DWORD iDevNum,
81 PDISPLAY_DEVICEW lpDisplayDevice,
83{
85 BOOL rc;
86
87 RtlInitUnicodeString(&Device, lpDevice);
88
90 &Device,
91 iDevNum,
92 lpDisplayDevice,
93 dwFlags);
94
95 return rc;
96}
97
98
99/*
100 * @implemented
101 */
102BOOL
103WINAPI
105 HDC hdc,
106 LPCRECT lprcClip,
107 MONITORENUMPROC lpfnEnum,
109{
110 INT iCount, i;
111 HMONITOR *hMonitorList;
112 LPRECT pRectList;
113 HANDLE hHeap;
114 BOOL ret = FALSE;
115
116 /* get list of monitors/rects */
117 iCount = NtUserEnumDisplayMonitors(hdc, lprcClip, NULL, NULL, 0);
118 if (iCount < 0)
119 {
120 /* FIXME: SetLastError() */
121 return FALSE;
122 }
123 if (iCount == 0)
124 {
125 return TRUE;
126 }
127
128 hHeap = GetProcessHeap();
129 hMonitorList = HeapAlloc(hHeap, 0, sizeof (HMONITOR) * iCount);
130 if (hMonitorList == NULL)
131 {
133 return FALSE;
134 }
135 pRectList = HeapAlloc(hHeap, 0, sizeof (RECT) * iCount);
136 if (pRectList == NULL)
137 {
139 goto cleanup;
140 }
141
142 iCount = NtUserEnumDisplayMonitors(hdc, lprcClip, hMonitorList, pRectList, iCount);
143 if (iCount <= 0)
144 {
145 /* FIXME: SetLastError() */
146 goto cleanup;
147 }
148
149 /* enumerate list */
150 for (i = 0; i < iCount; i++)
151 {
152 HMONITOR hMonitor = hMonitorList[i];
153 LPRECT pMonitorRect = pRectList + i;
154 HDC hMonitorDC = NULL;
155
156 if (hdc != NULL)
157 {
158 /* make monitor DC */
159 hMonitorDC = hdc;
160 }
161
162 if (!lpfnEnum(hMonitor, hMonitorDC, pMonitorRect, dwData))
163 goto cleanup; /* return FALSE */
164 }
165
166 ret = TRUE;
167
168cleanup:
169 if(hMonitorList)
170 HeapFree(hHeap, 0, hMonitorList);
171 if(pRectList)
172 HeapFree(hHeap, 0, pRectList);
173 return ret;
174}
175
176
177/*
178 * @implemented
179 */
180BOOL
181WINAPI
183 LPCSTR lpszDeviceName,
187{
189 UNICODE_STRING usDeviceName;
190 PUNICODE_STRING pusDeviceName = NULL;
191 LPDEVMODEW lpExtendedDevMode;
192 BOOL Result = FALSE;
193
194 if (lpszDeviceName)
195 {
196 if (!RtlCreateUnicodeStringFromAsciiz(&usDeviceName, (PCSZ)lpszDeviceName))
197 {
199 return FALSE;
200 }
201 pusDeviceName = &usDeviceName;
202 }
203
204 /* Allocate memory for DEVMODEW and extra data */
205 lpExtendedDevMode = RtlAllocateHeap(RtlGetProcessHeap(),
207 sizeof(DEVMODEW) + lpDevMode->dmDriverExtra);
208 if (!lpExtendedDevMode)
209 {
210 if (pusDeviceName)
211 RtlFreeUnicodeString(&usDeviceName);
212
213 return FALSE;
214 }
215
216 /* Initialize structure fields */
217 lpExtendedDevMode->dmSize = sizeof(DEVMODEW);
218 lpExtendedDevMode->dmDriverExtra = lpDevMode->dmDriverExtra;
219
220 Status = NtUserEnumDisplaySettings(pusDeviceName, iModeNum, lpExtendedDevMode, dwFlags);
221
222 if (pusDeviceName)
223 RtlFreeUnicodeString(&usDeviceName);
224
225 if (NT_SUCCESS(Status))
226 {
227 /* Store old structure size */
228 WORD OldSize = lpDevMode->dmSize;
229
230#define COPYS(f,len) WideCharToMultiByte(CP_THREAD_ACP, 0, lpExtendedDevMode->f, len, (LPSTR)lpDevMode->f, len, NULL, NULL)
231#define COPYN(f) lpDevMode->f = lpExtendedDevMode->f
232
233 COPYS(dmDeviceName, CCHDEVICENAME);
234 COPYN(dmSpecVersion);
235 COPYN(dmDriverVersion);
236 COPYN(dmFields);
237 COPYN(dmPosition.x);
238 COPYN(dmPosition.y);
239 COPYN(dmScale);
240 COPYN(dmCopies);
241 COPYN(dmDefaultSource);
242 COPYN(dmPrintQuality);
243 COPYN(dmColor);
244 COPYN(dmDuplex);
245 COPYN(dmYResolution);
246 COPYN(dmTTOption);
247 COPYN(dmCollate);
248 COPYS(dmFormName,CCHFORMNAME);
249 COPYN(dmLogPixels);
250 COPYN(dmBitsPerPel);
251 COPYN(dmPelsWidth);
252 COPYN(dmPelsHeight);
253 COPYN(dmDisplayFlags); // aka dmNup
254 COPYN(dmDisplayFrequency);
255
256 /* we're done with 0x300 fields */
257 if (OldSize > SIZEOF_DEVMODEA_300)
258 {
259 COPYN(dmICMMethod);
260 COPYN(dmICMIntent);
261 COPYN(dmMediaType);
262 COPYN(dmDitherType);
263 COPYN(dmReserved1);
264 COPYN(dmReserved2);
265
266 /* we're done with 0x400 fields */
267 if (OldSize > SIZEOF_DEVMODEA_400)
268 {
269 COPYN(dmPanningWidth);
270 COPYN(dmPanningHeight);
271 }
272 }
273
274 /* Restore old size */
275 lpDevMode->dmSize = OldSize;
276
277 /* Extra data presented? */
278 if (lpDevMode->dmDriverExtra && lpExtendedDevMode->dmDriverExtra)
279 {
280 /* We choose the smallest size */
281 if (lpDevMode->dmDriverExtra > lpExtendedDevMode->dmDriverExtra)
282 lpDevMode->dmDriverExtra = lpExtendedDevMode->dmDriverExtra;
283
284 /* Copy extra data */
285 RtlCopyMemory((PUCHAR)lpDevMode + OldSize,
286 lpExtendedDevMode + 1,
288 }
289
290 /* If the size of source structure is less, than used, we clean unsupported flags */
291 if (OldSize < FIELD_OFFSET(DEVMODEA, dmPanningHeight))
292 lpDevMode->dmFields &= ~DM_PANNINGHEIGHT;
293
294 if (OldSize < FIELD_OFFSET(DEVMODEA, dmPanningWidth))
295 lpDevMode->dmFields &= ~DM_PANNINGWIDTH;
296
297 Result = TRUE;
298 }
299
300 /* Free memory */
301 RtlFreeHeap(RtlGetProcessHeap(), 0, lpExtendedDevMode);
302
303 return Result;
304}
305
306
307/*
308 * @implemented
309 */
310BOOL
311WINAPI
313 LPCSTR lpszDeviceName,
316{
317 /* Fixup sizes */
318 lpDevMode->dmSize = FIELD_OFFSET(DEVMODEA, dmICMMethod);
320
321 return EnumDisplaySettingsExA(lpszDeviceName, iModeNum, lpDevMode, 0);
322}
323
324
325/*
326 * @implemented
327 */
328BOOL
329WINAPI
331 LPCWSTR lpszDeviceName,
335{
337 UNICODE_STRING usDeviceName;
338 PUNICODE_STRING pusDeviceName = NULL;
339 LPDEVMODEW lpExtendedDevMode;
340 BOOL Result = FALSE;
341
342 if (lpszDeviceName)
343 {
344 RtlInitUnicodeString(&usDeviceName, lpszDeviceName);
345 pusDeviceName = &usDeviceName;
346 }
347
348 /* Allocate memory for DEVMODEW and extra data */
349 lpExtendedDevMode = RtlAllocateHeap(RtlGetProcessHeap(),
351 sizeof(DEVMODEW) + lpDevMode->dmDriverExtra);
352 if (!lpExtendedDevMode)
353 return FALSE;
354
355 /* Initialize structure fields */
356 lpExtendedDevMode->dmSize = sizeof(DEVMODEW);
357 lpExtendedDevMode->dmDriverExtra = lpDevMode->dmDriverExtra;
358
359 Status = NtUserEnumDisplaySettings(pusDeviceName, iModeNum, lpExtendedDevMode, dwFlags);
360 if (NT_SUCCESS(Status))
361 {
362 /* Store old structure sizes */
363 WORD OldSize = lpDevMode->dmSize;
364 WORD OldDriverExtra = lpDevMode->dmDriverExtra;
365
366 /* Copy general data */
367 RtlCopyMemory(lpDevMode, lpExtendedDevMode, OldSize);
368
369 /* Restore old sizes */
370 lpDevMode->dmSize = OldSize;
371 lpDevMode->dmDriverExtra = OldDriverExtra;
372
373 /* Extra data presented? */
374 if (lpDevMode->dmDriverExtra && lpExtendedDevMode->dmDriverExtra)
375 {
376 /* We choose the smallest size */
377 if (lpDevMode->dmDriverExtra > lpExtendedDevMode->dmDriverExtra)
378 lpDevMode->dmDriverExtra = lpExtendedDevMode->dmDriverExtra;
379
380 /* Copy extra data */
381 RtlCopyMemory((PUCHAR)lpDevMode + OldSize,
382 lpExtendedDevMode + 1,
384 }
385
386 /* If the size of source structure is less, than used, we clean unsupported flags */
387 if (OldSize < FIELD_OFFSET(DEVMODEW, dmPanningHeight))
388 lpDevMode->dmFields &= ~DM_PANNINGHEIGHT;
389
390 if (OldSize < FIELD_OFFSET(DEVMODEW, dmPanningWidth))
391 lpDevMode->dmFields &= ~DM_PANNINGWIDTH;
392
393 Result = TRUE;
394 }
395
396 /* Free memory */
397 RtlFreeHeap(RtlGetProcessHeap(), 0, lpExtendedDevMode);
398
399 return Result;
400}
401
402
403/*
404 * @implemented
405 */
406BOOL
407WINAPI
409 LPCWSTR lpszDeviceName,
412{
413 /* Fixup sizes */
414 lpDevMode->dmSize = FIELD_OFFSET(DEVMODEW, dmICMMethod);
416
417 return EnumDisplaySettingsExW(lpszDeviceName, iModeNum, lpDevMode, 0);
418}
419
420
421/*
422 * @implemented
423 */
424BOOL
425WINAPI
427 HMONITOR hMonitor,
428 LPMONITORINFO lpmi)
429{
430 if (lpmi->cbSize == sizeof (MONITORINFO))
431 {
432 return NtUserGetMonitorInfo(hMonitor, lpmi);
433 }
434 else if (lpmi->cbSize != sizeof (MONITORINFOEXA))
435 {
437 return FALSE;
438 }
439 else
440 {
441 MONITORINFOEXW miExW;
442 INT res;
443
444 miExW.cbSize = sizeof (MONITORINFOEXW);
445 if (!NtUserGetMonitorInfo(hMonitor, (LPMONITORINFO)&miExW))
446 {
447 return FALSE;
448 }
449 memcpy(lpmi, &miExW, sizeof (MONITORINFO));
451 ((LPMONITORINFOEXA)lpmi)->szDevice, CCHDEVICENAME,
452 NULL, NULL);
453 if (res == 0)
454 {
455 WARN("WideCharToMultiByte() failed!\n");
456 return FALSE;
457 }
458 }
459
460 return TRUE;
461}
462
463
464/*
465 * @implemented
466 */
467BOOL
468WINAPI
470 HMONITOR hMonitor,
471 LPMONITORINFO lpmi)
472{
473 return NtUserGetMonitorInfo(hMonitor, lpmi);
474}
475
476
477/*
478 * @implemented
479 */
481WINAPI
483 IN POINT ptPoint,
485{
486 return NtUserMonitorFromPoint(ptPoint, dwFlags);
487}
488
489
490/*
491 * @implemented
492 */
494WINAPI
496 IN LPCRECT lpcRect,
498{
499 return NtUserMonitorFromRect(lpcRect, dwFlags);
500}
501
502
503/*
504 * @implemented
505 */
507WINAPI
509 IN HWND hWnd,
511{
513}
514
515
516/*
517 * @implemented
518 */
519LONG
520WINAPI
522 LPCSTR lpszDeviceName,
524 HWND hwnd,
527{
528 LONG rc;
530 PUNICODE_STRING pDeviceName = &DeviceName;
531
532 if (lpszDeviceName != NULL)
533 {
534 if (!RtlCreateUnicodeStringFromAsciiz(pDeviceName, (PCSZ)lpszDeviceName))
535 {
537 return DISP_CHANGE_BADPARAM; /* FIXME what to return? */
538 }
539 }
540 else
541 pDeviceName = NULL;
542
543 if (lpDevMode != NULL)
544 {
545 LPDEVMODEW pDevModeW;
546 pDevModeW = GdiConvertToDevmodeW(lpDevMode);
547 if(pDevModeW)
548 {
549 rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, dwflags, lParam);
550 RtlFreeHeap(GetProcessHeap(), 0, pDevModeW);
551 }
552 else
554 }
555 else
556 rc = NtUserChangeDisplaySettings(pDeviceName, NULL, dwflags, lParam);
557
558 if (lpszDeviceName != NULL)
560
561 return rc;
562}
563
564
565/*
566 * @implemented
567 */
568LONG
569WINAPI
573{
574 if(lpDevMode)
577}
578
579
580/*
581 * @implemented
582 */
583LONG
584WINAPI
586 LPCWSTR lpszDeviceName,
588 HWND hwnd,
591{
592 LONG rc;
594 PUNICODE_STRING pDeviceName = &DeviceName;
595
596 if (lpszDeviceName != NULL)
597 RtlInitUnicodeString(pDeviceName, lpszDeviceName);
598 else
599 pDeviceName = NULL;
600
602
603 return rc;
604}
605
606
607/*
608 * @implemented
609 */
610LONG
611WINAPI
615{
616 if(lpDevMode)
619}
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
#define WARN(fmt,...)
Definition: debug.h:115
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
LPARAM lParam
Definition: combotst.c:139
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define CCHDEVICENAME
Definition: ddrawi.h:63
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WideCharToMultiByte
Definition: compat.h:111
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static void cleanup(void)
Definition: main.c:1335
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
Status
Definition: gdiplustypes.h:25
GLuint res
Definition: glext.h:9613
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
HMONITOR NTAPI NtUserMonitorFromPoint(IN POINT point, IN DWORD dwFlags)
Definition: monitor.c:827
BOOL NTAPI NtUserGetMonitorInfo(IN HMONITOR hMonitor, OUT LPMONITORINFO pMonitorInfo)
Definition: monitor.c:728
HMONITOR NTAPI NtUserMonitorFromWindow(IN HWND hWnd, IN DWORD dwFlags)
Definition: monitor.c:967
INT NTAPI NtUserEnumDisplayMonitors(OPTIONAL IN HDC hDC, OPTIONAL IN LPCRECT pRect, OPTIONAL OUT HMONITOR *hMonitorList, OPTIONAL OUT LPRECT monitorRectList, OPTIONAL IN DWORD listSize)
HMONITOR NTAPI NtUserMonitorFromRect(IN LPCRECT pRect, IN DWORD dwFlags)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static _In_ DWORD dwflags
Definition: dispmode.c:64
static _In_ DWORD iModeNum
Definition: dispmode.c:77
static _In_ DWORD _Inout_ PDEVMODEA lpDevMode
Definition: dispmode.c:77
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
static HANDLE ULONG_PTR dwData
Definition: file.c:35
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
long LONG
Definition: pedump.c:60
DWORD StateFlags
Definition: wingdi.h:2812
CHAR DeviceString[128]
Definition: wingdi.h:2811
CHAR DeviceName[32]
Definition: wingdi.h:2810
CHAR DeviceID[128]
Definition: wingdi.h:2813
CHAR DeviceKey[128]
Definition: wingdi.h:2814
WCHAR DeviceName[32]
Definition: wingdi.h:2818
DWORD StateFlags
Definition: wingdi.h:2820
WCHAR DeviceString[128]
Definition: wingdi.h:2819
WCHAR DeviceKey[128]
Definition: wingdi.h:2822
WCHAR DeviceID[128]
Definition: wingdi.h:2821
DWORD dmFields
Definition: wingdi.h:1570
WORD dmDriverExtra
Definition: wingdi.h:1569
WORD dmSize
Definition: wingdi.h:1568
WORD dmDriverExtra
Definition: wingdi.h:1621
WORD dmSize
Definition: wingdi.h:1620
WCHAR szDevice[CCHDEVICENAME]
Definition: winuser.h:3804
DWORD cbSize
Definition: winuser.h:3784
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
int32_t INT
Definition: typedefs.h:58
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
CONST char * PCSZ
Definition: umtypes.h:125
int ret
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
BOOL NTAPI NtUserEnumDisplayDevices(PUNICODE_STRING pustrDevice, DWORD iDevNum, PDISPLAY_DEVICEW pDisplayDevice, DWORD dwFlags)
Definition: display.c:366
NTSTATUS APIENTRY NtUserEnumDisplaySettings(IN PUNICODE_STRING pustrDevice, IN DWORD iModeNum, OUT LPDEVMODEW lpDevMode, IN DWORD dwFlags)
Definition: display.c:588
LONG APIENTRY NtUserChangeDisplaySettings(PUNICODE_STRING pustrDevice, LPDEVMODEW lpDevMode, DWORD dwflags, LPVOID lParam)
Definition: display.c:946
BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEA lpDevMode, DWORD dwFlags)
Definition: display.c:182
LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR lpszDeviceName, LPDEVMODEW lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam)
Definition: display.c:585
BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpmi)
Definition: display.c:469
HMONITOR WINAPI MonitorFromWindow(IN HWND hWnd, IN DWORD dwFlags)
Definition: display.c:508
BOOL WINAPI EnumDisplayDevicesA(LPCSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEA lpDisplayDevice, DWORD dwFlags)
Definition: display.c:23
BOOL WINAPI EnumDisplayDevicesW(LPCWSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags)
Definition: display.c:78
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
BOOL WINAPI EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEA lpDevMode)
Definition: display.c:312
#define COPYN(f)
#define COPYS(f, len)
BOOL WINAPI EnumDisplayMonitors(HDC hdc, LPCRECT lprcClip, MONITORENUMPROC lpfnEnum, LPARAM dwData)
Definition: display.c:104
BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode, DWORD dwFlags)
Definition: display.c:330
LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW lpDevMode, DWORD dwflags)
Definition: display.c:612
LONG WINAPI ChangeDisplaySettingsExA(LPCSTR lpszDeviceName, LPDEVMODEA lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam)
Definition: display.c:521
#define SIZEOF_DEVMODEA_300
Definition: display.c:12
BOOL WINAPI GetMonitorInfoA(HMONITOR hMonitor, LPMONITORINFO lpmi)
Definition: display.c:426
HMONITOR WINAPI MonitorFromRect(IN LPCRECT lpcRect, IN DWORD dwFlags)
Definition: display.c:495
#define SIZEOF_DEVMODEA_400
Definition: display.c:13
LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwflags)
Definition: display.c:570
HMONITOR WINAPI MonitorFromPoint(IN POINT ptPoint, IN DWORD dwFlags)
Definition: display.c:482
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
DEVMODEW *WINAPI GdiConvertToDevmodeW(const DEVMODEA *)
Definition: misc.c:969
#define CCHFORMNAME
Definition: wingdi.h:67
struct _DISPLAY_DEVICEW DISPLAY_DEVICEW
struct _devicemodeW DEVMODEW
#define CP_THREAD_ACP
Definition: winnls.h:233
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
#define DISP_CHANGE_BADPARAM
Definition: winuser.h:193
struct tagMONITORINFOEXW MONITORINFOEXW
BOOL(CALLBACK * MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM)
Definition: winuser.h:2909
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
const char * LPCSTR
Definition: xmlstorage.h:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185