ReactOS  0.4.12-dev-102-g4b7f1e0
display.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactX Diagnosis Application
3  * LICENSE: LGPL - See COPYING in the top level directory
4  * FILE: base/applications/dxdiag/display.c
5  * PURPOSE: ReactX diagnosis display page
6  * COPYRIGHT: Copyright 2008 Johannes Anderwald
7  *
8  */
9 
10 #include "precomp.h"
11 
12 #include <d3d9.h>
13 
14 BOOL
15 GetFileModifyTime(LPCWSTR pFullPath, WCHAR * szTime, int szTimeSize)
16 {
17  HANDLE hFile;
18  FILETIME AccessTime;
19  SYSTEMTIME SysTime, LocalTime;
20  UINT Length;
21  TIME_ZONE_INFORMATION TimeInfo;
22 
23  hFile = CreateFileW(pFullPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
24  if (!hFile)
25  return FALSE;
26 
27  if (!GetFileTime(hFile, NULL, NULL, &AccessTime))
28  {
29  CloseHandle(hFile);
30  return FALSE;
31  }
32  CloseHandle(hFile);
33 
34  if(!GetTimeZoneInformation(&TimeInfo))
35  return FALSE;
36 
37  if (!FileTimeToSystemTime(&AccessTime, &SysTime))
38  return FALSE;
39 
40  if (!SystemTimeToTzSpecificLocalTime(&TimeInfo, &SysTime, &LocalTime))
41  return FALSE;
42 
43  Length = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &LocalTime, NULL, szTime, szTimeSize);
44  szTime[Length-1] = L' ';
45  return GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT, &LocalTime, NULL, &szTime[Length], szTimeSize-Length);
46 }
47 
48 
49 
50 static UINT WINAPI
52  IN UINT Notification,
53  IN UINT_PTR Param1,
54  IN UINT_PTR Param2)
55 {
56  LPCWSTR pFile;
58  LPCWSTR pFullPath = (LPCWSTR)Param1;
59  WCHAR szVer[60];
60  LRESULT Length, fLength;
61  HWND * hDlgCtrls = (HWND *)Context;
62 
63  if (wcsstr(pFullPath, L"\\DRIVERS\\"))
64  {
65  /* exclude files from drivers dir to have failsafe file version/date information */
66  return NO_ERROR;
67  }
68 
69  pFile = wcsrchr(pFullPath, L'\\');
70  if (!pFile)
71  return NO_ERROR;
72 
73  pFile++;
74  fLength = wcslen(pFile) + 1;
75 
76  Length = SendMessageW(hDlgCtrls[0], WM_GETTEXTLENGTH, 0, 0) + 1;
77  pBuffer = HeapAlloc(GetProcessHeap(), 0, (Length + fLength) * sizeof(WCHAR));
78  if (!pBuffer)
79  return ERROR_OUTOFMEMORY;
80 
81  Length = SendMessageW(hDlgCtrls[0], WM_GETTEXT, Length, (LPARAM)pBuffer);
82  if (Length)
83  {
84  pBuffer[Length++] = L',';
85  }
86  else
87  {
88  /* set file version */
89  if (GetFileVersion(pFullPath, szVer, sizeof(szVer)/sizeof(WCHAR)))
90  SendMessageW(hDlgCtrls[1], WM_SETTEXT, 0, (LPARAM)szVer);
91  /* set file time */
92  if (GetFileModifyTime(pFullPath, szVer, sizeof(szVer)/sizeof(WCHAR)))
93  SendMessageW(hDlgCtrls[2], WM_SETTEXT, 0, (LPARAM)szVer);
94  }
95 
96  wcscpy(&pBuffer[Length], pFile);
97  SendMessageW(hDlgCtrls[0], WM_SETTEXT, 0, (LPARAM)pBuffer);
98  HeapFree(GetProcessHeap(), 0, pBuffer);
99  return NO_ERROR;
100 }
101 
102 VOID
104 {
105  HSPFILEQ hQueue;
107  SP_DRVINFO_DATA DriverInfoData;
108  DWORD Result;
109 
110  DeviceInstallParams.cbSize = sizeof(DeviceInstallParams);
111  if (!SetupDiGetDeviceInstallParamsW(hList, pInfoData, &DeviceInstallParams))
112  return;
113 
114  DeviceInstallParams.FlagsEx |= (DI_FLAGSEX_INSTALLEDDRIVER | DI_FLAGSEX_ALLOWEXCLUDEDDRVS);
115  if (!SetupDiSetDeviceInstallParams(hList, pInfoData, &DeviceInstallParams))
116  return;
117 
118  if (!SetupDiBuildDriverInfoList(hList, pInfoData, SPDIT_CLASSDRIVER))
119  return;
120 
121  DriverInfoData.cbSize = sizeof(DriverInfoData);
122  if (!SetupDiEnumDriverInfoW(hList, pInfoData, SPDIT_CLASSDRIVER, 0, &DriverInfoData))
123  return;
124 
125  DriverInfoData.cbSize = sizeof(DriverInfoData);
126  if (!SetupDiSetSelectedDriverW(hList, pInfoData, &DriverInfoData))
127  return;
128 
129  hQueue = SetupOpenFileQueue();
130  if (hQueue == (HSPFILEQ)INVALID_HANDLE_VALUE)
131  return;
132 
133  DeviceInstallParams.cbSize = sizeof(DeviceInstallParams);
134  if (!SetupDiGetDeviceInstallParamsW(hList, pInfoData, &DeviceInstallParams))
135  {
136  SetupCloseFileQueue(hQueue);
137  return;
138  }
139 
140  DeviceInstallParams.FileQueue = hQueue;
141  DeviceInstallParams.Flags |= DI_NOVCP;
142 
143  if (!SetupDiSetDeviceInstallParamsW(hList, pInfoData, &DeviceInstallParams))
144  {
145  SetupCloseFileQueue(hQueue);
146  return;
147  }
148 
149  if(!SetupDiCallClassInstaller(DIF_INSTALLDEVICEFILES, hList, pInfoData))
150  {
151  SetupCloseFileQueue(hQueue);
152  return;
153  }
154 
155 
156  /* enumerate the driver files */
158  SetupCloseFileQueue(hQueue);
159 }
160 
161 static
162 void
163 DisplayPageSetDeviceDetails(HWND * hDlgCtrls, LPCGUID classGUID, LPGUID * deviceGUID)
164 {
165  HDEVINFO hInfo;
166  DWORD dwIndex = 0;
167  SP_DEVINFO_DATA InfoData;
168  WCHAR szText[100];
169 
170  /* create the setup list */
172  if (hInfo == INVALID_HANDLE_VALUE)
173  return;
174 
175  do
176  {
177  ZeroMemory(&InfoData, sizeof(InfoData));
178  InfoData.cbSize = sizeof(InfoData);
179 
180  if (SetupDiEnumDeviceInfo(hInfo, dwIndex, &InfoData))
181  {
182  /* set device name */
183  if (SetupDiGetDeviceRegistryPropertyW(hInfo, &InfoData, SPDRP_DEVICEDESC, NULL, (PBYTE)szText, sizeof(szText), NULL))
184  SendMessageW(hDlgCtrls[0], WM_SETTEXT, 0, (LPARAM)szText);
185 
186  /* set the manufacturer name */
187  if (SetupDiGetDeviceRegistryPropertyW(hInfo, &InfoData, SPDRP_MFG, NULL, (PBYTE)szText, sizeof(szText), NULL))
188  SendMessageW(hDlgCtrls[1], WM_SETTEXT, 0, (LPARAM)szText);
189 
190  /* FIXME
191  * we currently enumerate only the first adapter
192  */
193  EnumerateDrivers(&hDlgCtrls[2], hInfo, &InfoData);
194  break;
195  }
196 
198  break;
199 
200  dwIndex++;
201  }while(TRUE);
202 
203  /* destroy the setup list */
205 }
206 
207 
208 static
209 BOOL
211 {
212  WCHAR szText[100];
213  WCHAR szFormat[30];
214  HKEY hKey;
215  HWND hDlgCtrls[5];
216  DWORD dwMemory;
217  DEVMODEW DevMode;
218  IDirect3D9 * ppObj = NULL;
219  D3DADAPTER_IDENTIFIER9 Identifier;
220  HRESULT hResult;
221 
222  szText[0] = L'\0';
223 
224  /* fix wine */
225  //ppObj = Direct3DCreate9(D3D_SDK_VERSION);
226  if (ppObj)
227  {
228  hResult = IDirect3D9_GetAdapterIdentifier(ppObj, D3DADAPTER_DEFAULT , 2/*D3DENUM_WHQL_LEVEL*/, &Identifier);
229  if (hResult == D3D_OK)
230  {
231 
232  if (Identifier.WHQLLevel)
233  {
234  /* adapter is WHQL certified */
235  LoadStringW(hInst, IDS_OPTION_YES, szText, sizeof(szText)/sizeof(WCHAR));
236  }
237  else
238  {
239  LoadStringW(hInst, IDS_NOT_APPLICABLE, szText, sizeof(szText)/sizeof(WCHAR));
240  }
241  }
242  IDirect3D9_Release(ppObj);
243  }
244  else
245  {
246  LoadStringW(hInst, IDS_NOT_APPLICABLE, szText, sizeof(szText)/sizeof(WCHAR));
247  }
248  szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0';
250 
251  if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, &pDispDevice->DeviceKey[18], 0, KEY_READ, &hKey) != ERROR_SUCCESS)
252  return FALSE;
253 
254  if (GetRegValue(hKey, NULL, L"HardwareInformation.ChipType", REG_BINARY, szText, sizeof(szText)))
255  {
256  /* set chip type */
258  }
259 
260  if (GetRegValue(hKey, NULL, L"HardwareInformation.DacType", REG_BINARY, szText, sizeof(szText)))
261  {
262  /* set DAC type */
264  }
265 
266  if (GetRegValue(hKey, NULL, L"HardwareInformation.MemorySize", REG_BINARY, (LPWSTR)&dwMemory, sizeof(dwMemory)))
267  {
268  /* set chip memory size */
269  if (dwMemory > (1048576))
270  {
271  /* buggy ATI driver requires that */
272  dwMemory /= 1048576;
273  }
274  szFormat[0] = L'\0';
275  if (LoadStringW(hInst, IDS_FORMAT_ADAPTER_MEM, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
276  szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0';
277  wsprintfW(szText, szFormat, dwMemory);
279  }
280 
281  /* retrieve current display mode */
282  DevMode.dmSize = sizeof(DEVMODEW);
283  if (EnumDisplaySettingsW(pDispDevice->DeviceName, ENUM_CURRENT_SETTINGS, &DevMode))
284  {
285  szFormat[0] = L'\0';
286  if (LoadStringW(hInst, IDS_FORMAT_ADAPTER_MODE, szFormat, sizeof(szFormat)/sizeof(WCHAR)))
287  szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0';
288  wsprintfW(szText, szFormat, DevMode.dmPelsWidth, DevMode.dmPelsHeight, DevMode.dmBitsPerPel, DevMode.dmDisplayFrequency);
290  }
291 
292  /* query attached monitor */
293  wcscpy(szText, pDispDevice->DeviceName);
294  ZeroMemory(pDispDevice, sizeof(DISPLAY_DEVICEW));
295  pDispDevice->cb = sizeof(DISPLAY_DEVICEW);
296  if (EnumDisplayDevicesW(szText, 0, pDispDevice, 0))
297  {
298  /* set monitor name */
300  }
301 
302  hDlgCtrls[0] = GetDlgItem(hwndDlg, IDC_STATIC_ADAPTER_ID);
303  hDlgCtrls[1] = GetDlgItem(hwndDlg, IDC_STATIC_ADAPTER_VENDOR);
304  hDlgCtrls[2] = GetDlgItem(hwndDlg, IDC_STATIC_ADAPTER_DRIVER);
305  hDlgCtrls[3] = GetDlgItem(hwndDlg, IDC_STATIC_ADAPTER_VERSION);
306  hDlgCtrls[4] = GetDlgItem(hwndDlg, IDC_STATIC_ADAPTER_DATE);
307 
308  DisplayPageSetDeviceDetails(hDlgCtrls, &GUID_DEVCLASS_DISPLAY, NULL);
309  return TRUE;
310 }
311 
313 {
314  DISPLAY_DEVICEW DispDevice;
315  HWND * hDlgs;
316  HWND hwndDlg;
317  WCHAR szDisplay[20];
318  WCHAR szText[30];
319  DWORD dwOffset = 0;
320 
321  while(TRUE)
322  {
323  ZeroMemory(&DispDevice, sizeof(DISPLAY_DEVICEW));
324  DispDevice.cb = sizeof(DISPLAY_DEVICEW);
325  if (!EnumDisplayDevicesW(NULL, pContext->NumDisplayAdapter + dwOffset, &DispDevice, 0))
326  return;
327 
328  /* skip devices not attached to the desktop and mirror drivers */
330  {
331  dwOffset++;
332  continue;
333  }
334  if (pContext->NumDisplayAdapter)
335  hDlgs = HeapReAlloc(GetProcessHeap(), 0, pContext->hDisplayWnd, (pContext->NumDisplayAdapter + 1) * sizeof(HWND));
336  else
337  hDlgs = HeapAlloc(GetProcessHeap(), 0, (pContext->NumDisplayAdapter + 1) * sizeof(HWND));
338 
339  if (!hDlgs)
340  break;
341 
342  pContext->hDisplayWnd = hDlgs;
344  if (!hwndDlg)
345  break;
346 
347  /* initialize the dialog */
348  InitializeDialog(hwndDlg, &DispDevice);
349 
350  szDisplay[0] = L'\0';
351  LoadStringW(hInst, IDS_DISPLAY_DIALOG, szDisplay, sizeof(szDisplay)/sizeof(WCHAR));
352  szDisplay[(sizeof(szDisplay)/sizeof(WCHAR))-1] = L'\0';
353 
354  wsprintfW (szText, L"%s %u", szDisplay, pContext->NumDisplayAdapter + 1);
355  InsertTabCtrlItem(GetDlgItem(pContext->hMainDialog, IDC_TAB_CONTROL), pContext->NumDisplayAdapter + 1, szText);
356 
357  hDlgs[pContext->NumDisplayAdapter] = hwndDlg;
358  pContext->NumDisplayAdapter++;
359  }
360 
361 
362 }
363 
364 
367 {
368  RECT rect;
370  switch (message)
371  {
372  case WM_INITDIALOG:
373  {
374  pContext = (PDXDIAG_CONTEXT) lParam;
375  SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)pContext);
377  return TRUE;
378  }
379  case WM_COMMAND:
380  {
381  switch(LOWORD(wParam))
382  {
383  case IDC_BUTTON_TESTDD:
384  case IDC_BUTTON_TEST3D:
385  GetWindowRect(pContext->hMainDialog, &rect);
386  /* FIXME log result errors */
387  if (IDC_BUTTON_TESTDD == LOWORD(wParam))
388  DDTests();
389  else if (IDC_BUTTON_TEST3D == LOWORD(wParam))
390  D3DTests();
392  break;
393  }
394  break;
395  }
396  }
397 
398  return FALSE;
399 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define D3DADAPTER_DEFAULT
Definition: d3d8.h:57
BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO devinfo, DWORD index, PSP_DEVINFO_DATA info)
Definition: devinst.c:1792
#define WM_GETTEXTLENGTH
Definition: winuser.h:1601
DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation)
Definition: timezone.c:262
#define IN
Definition: typedefs.h:38
Definition: tftpd.h:59
INT_PTR CALLBACK DisplayPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: display.c:366
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
VOID InsertTabCtrlItem(HWND hDlgCtrl, INT Position, LPWSTR uId)
Definition: dxdiag.c:102
#define ERROR_SUCCESS
Definition: deptool.c:10
#define SPDRP_MFG
Definition: setupapi.h:513
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:95
TCHAR szTime[64]
Definition: solitaire.cpp:18
BOOL WINAPI SetupDiSetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
Definition: devinst.c:4563
HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID *class, LPCWSTR enumstr, HWND parent, DWORD flags)
Definition: devinst.c:2297
#define REG_BINARY
Definition: nt_native.h:1496
#define KEY_READ
Definition: nt_native.h:1023
static void DisplayPageSetDeviceDetails(HWND *hDlgCtrls, LPCGUID classGUID, LPGUID *deviceGUID)
Definition: display.c:163
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI SetupDiEnumDriverInfoW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN DWORD DriverType, IN DWORD MemberIndex, OUT PSP_DRVINFO_DATA_W DriverInfoData)
Definition: driver.c:1355
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
BOOL WINAPI SetupScanFileQueueW(HSPFILEQ handle, DWORD flags, HWND window, PSP_FILE_CALLBACK_W handler, PVOID context, PDWORD result)
Definition: queue.c:1558
ULONG NumDisplayAdapter
Definition: precomp.h:33
#define IDC_BUTTON_TESTDD
Definition: resource.h:54
#define LOCALE_USER_DEFAULT
#define DATE_SHORTDATE
Definition: winnls.h:193
#define WM_GETTEXT
Definition: winuser.h:1600
WCHAR DeviceString[128]
Definition: wingdi.h:2796
HSPFILEQ WINAPI SetupOpenFileQueue(VOID)
Definition: fileqsup.c:161
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Property, PDWORD PropertyRegDataType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize)
Definition: devinst.c:3229
LONG top
Definition: windef.h:297
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL GetFileModifyTime(LPCWSTR pFullPath, WCHAR *szTime, int szTimeSize)
Definition: display.c:15
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ZeroMemory
Definition: winbase.h:1635
BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION InstallFunction, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData)
Definition: devinst.c:4029
#define IDC_STATIC_ADAPTER_VERSION
Definition: resource.h:45
LONG left
Definition: windef.h:296
#define SWP_NOZORDER
Definition: winuser.h:1232
#define DI_FLAGSEX_ALLOWEXCLUDEDDRVS
Definition: setupapi.h:87
DWORD dmBitsPerPel
Definition: wingdi.h:1624
int32_t INT_PTR
Definition: typedefs.h:62
#define IDC_TAB_CONTROL
Definition: resource.h:16
#define WCHAR
Definition: msvc.h:43
LONG right
Definition: windef.h:298
#define NO_ERROR
Definition: dderror.h:5
#define IDC_STATIC_ADAPTER_VENDOR
Definition: resource.h:38
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define SetWindowLongPtr
Definition: treelist.c:70
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
WCHAR DeviceName[32]
Definition: wingdi.h:2795
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
BOOL GetFileVersion(LPCWSTR szAppName, WCHAR *szVer, DWORD szVerSize)
Definition: network.c:105
_In_ DWORD _In_ DWORD dwOffset
Definition: ntgdi.h:2032
UINT_PTR WPARAM
Definition: windef.h:207
#define IDS_NOT_APPLICABLE
Definition: resource.h:125
BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
Definition: timezone.c:377
#define SPQ_SCAN_USE_CALLBACK
Definition: setupapi.h:614
#define IDirect3D9_Release(p)
Definition: d3d9.h:220
BOOL GetRegValue(HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size)
Definition: system.c:15
static const WCHAR szText[]
Definition: dialog.c:139
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI SetupDiGetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
Definition: devinst.c:4456
static UINT WINAPI DriverFilesCallback(IN PVOID Context, IN UINT Notification, IN UINT_PTR Param1, IN UINT_PTR Param2)
Definition: display.c:51
#define IDC_STATIC_ADAPTER_MONITOR
Definition: resource.h:43
#define DI_NOVCP
Definition: setupapi.h:49
smooth NULL
Definition: ftsmooth.c:416
PVOID pBuffer
struct DXDIAG_CONTEXT * PDXDIAG_CONTEXT
_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:426
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcsrchr(_In_z_ const wchar_t *_Str, _In_ wchar_t _Ch)
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
#define WM_SETTEXT
Definition: winuser.h:1599
#define OPEN_EXISTING
Definition: compat.h:426
#define IDC_STATIC_ADAPTER_DRIVER
Definition: resource.h:44
#define IDD_DISPLAY_DIALOG
Definition: resource.h:8
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:178
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDC_STATIC_ADAPTER_ID
Definition: resource.h:37
LONG HRESULT
Definition: typedefs.h:77
#define IDC_STATIC_ADAPTER_DAC
Definition: resource.h:40
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define DISPLAY_DEVICE_MIRRORING_DRIVER
Definition: wingdi.h:1380
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2898
#define SetupDiSetDeviceInstallParams
Definition: setupapi.h:2613
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
Definition: wingdi.h:1377
WORD dmSize
Definition: wingdi.h:1597
unsigned int UINT
Definition: ndis.h:50
#define IDS_OPTION_YES
Definition: resource.h:126
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IDC_STATIC_ADAPTER_LOGO
Definition: resource.h:47
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
DWORD dmPelsWidth
Definition: wingdi.h:1625
#define IDirect3D9_GetAdapterIdentifier(p, a, b, c)
Definition: d3d9.h:224
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1087
#define DWLP_USER
Definition: winuser.h:866
DWORD StateFlags
Definition: wingdi.h:2797
#define IDS_DISPLAY_DIALOG
Definition: resource.h:105
#define GENERIC_READ
Definition: compat.h:124
struct _DISPLAY_DEVICEW DISPLAY_DEVICEW
#define WM_COMMAND
Definition: winuser.h:1716
#define SPDRP_DEVICEDESC
Definition: setupapi.h:502
WCHAR DeviceKey[128]
Definition: wingdi.h:2799
BOOL WINAPI SetupDiSetSelectedDriverW(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT PSP_DRVINFO_DATA_W DriverInfoData OPTIONAL)
Definition: driver.c:1590
_In_ HANDLE hFile
Definition: mswsock.h:90
#define WINAPI
Definition: msvc.h:20
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:916
#define SWP_NOSIZE
Definition: winuser.h:1230
HWND hList
Definition: livecd.c:10
DWORD dmDisplayFrequency
Definition: wingdi.h:1631
#define D3D_OK
Definition: d3d.h:106
HINSTANCE hInst
Definition: dxdiag.c:13
#define IDC_STATIC_ADAPTER_MODE
Definition: resource.h:42
#define TIME_FORCE24HOURFORMAT
Definition: winnls.h:268
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define HeapReAlloc
Definition: compat.h:393
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HWND * hDisplayWnd
Definition: precomp.h:34
VOID EnumerateDrivers(PVOID Context, HDEVINFO hList, PSP_DEVINFO_DATA pInfoData)
Definition: display.c:103
#define DIGCF_PROFILE
Definition: setupapi.h:173
#define CreateFileW
Definition: compat.h:400
DWORD dmPelsHeight
Definition: wingdi.h:1626
HWND hMainDialog
Definition: precomp.h:31
#define IDC_BUTTON_TEST3D
Definition: resource.h:55
BOOL WINAPI SetupDiBuildDriverInfoList(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN DWORD DriverType)
Definition: driver.c:718
#define IDS_FORMAT_ADAPTER_MEM
Definition: resource.h:150
#define IDS_FORMAT_ADAPTER_MODE
Definition: resource.h:151
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define SPDIT_CLASSDRIVER
Definition: setupapi.h:500
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
VOID D3DTests()
Definition: d3dtest.c:73
LONG bottom
Definition: windef.h:299
#define IDC_STATIC_ADAPTER_DATE
Definition: resource.h:46
#define IDC_STATIC_ADAPTER_CHIP
Definition: resource.h:39
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
struct _devicemodeW DEVMODEW
#define GetWindowLongPtr
Definition: treelist.c:73
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
#define DIF_INSTALLDEVICEFILES
Definition: setupapi.h:140
VOID DDTests()
Definition: ddtest.c:71
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1016
void InitializeDisplayAdapters(PDXDIAG_CONTEXT pContext)
Definition: display.c:312
BYTE * PBYTE
Definition: pedump.c:66
#define WM_INITDIALOG
Definition: winuser.h:1715
BOOL EnableDialogTheme(HWND hwnd)
Definition: dxdiag.c:38
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
BOOL WINAPI GetFileTime(IN HANDLE hFile, OUT LPFILETIME lpCreationTime OPTIONAL, OUT LPFILETIME lpLastAccessTime OPTIONAL, OUT LPFILETIME lpLastWriteTime OPTIONAL)
Definition: fileinfo.c:1046
BOOL WINAPI SetupCloseFileQueue(IN HSPFILEQ QueueHandle)
Definition: fileqsup.c:217
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define DIGCF_PRESENT
Definition: setupapi.h:171
static BOOL InitializeDialog(HWND hwndDlg, PDISPLAY_DEVICEW pDispDevice)
Definition: display.c:210
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define IDC_STATIC_ADAPTER_MEM
Definition: resource.h:41
#define LPCWSTR
Definition: msvc.h:45