ReactOS  0.4.14-dev-50-g13bb5e2
precomp.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <wingdi.h>
#include <winnls.h>
#include <winuser.h>
#include <setupapi.h>
#include <ddraw.h>
#include <initguid.h>
#include <devguid.h>
#include <strsafe.h>
#include <udmihelp.h>
#include "resource.h"
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DXDIAG_CONTEXT
 

Macros

#define DIRECTINPUT_VERSION   0x0800
 
#define DIRECTSOUND_VERSION   0x0800
 
#define D3D_OVERLOADS
 
#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 

Typedefs

typedef struct DXDIAG_CONTEXTPDXDIAG_CONTEXT
 

Functions

BOOL EnableDialogTheme (HWND hwnd)
 
INT_PTR CALLBACK SystemPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK DisplayPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK SoundPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK MusicPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK InputPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK NetworkPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK HelpPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
VOID DDTests (VOID)
 
VOID D3DTests (VOID)
 
void InitializeDirectSoundPage (PDXDIAG_CONTEXT pContext)
 
void InitializeDisplayAdapters (PDXDIAG_CONTEXT pContext)
 
BOOL GetFileVersion (LPCWSTR szAppName, WCHAR *szVer, DWORD szVerSize)
 
BOOL GetFileModifyTime (LPCWSTR pFullPath, WCHAR *szTime, int szTimeSize)
 
BOOL GetCatFileFromDriverPath (LPWSTR szFileName, LPWSTR szCatFileName)
 
BOOL GetRegValue (HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size)
 
VOID InsertTabCtrlItem (HWND hDlgCtrl, INT Position, LPWSTR uId)
 
VOID EnumerateDrivers (PVOID Context, HDEVINFO hList, PSP_DEVINFO_DATA pInfoData)
 

Variables

HINSTANCE hInst
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 11 of file precomp.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 12 of file precomp.h.

◆ D3D_OVERLOADS

#define D3D_OVERLOADS

Definition at line 6 of file precomp.h.

◆ DIRECTINPUT_VERSION

#define DIRECTINPUT_VERSION   0x0800

Definition at line 4 of file precomp.h.

◆ DIRECTSOUND_VERSION

#define DIRECTSOUND_VERSION   0x0800

Definition at line 5 of file precomp.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 10 of file precomp.h.

Typedef Documentation

◆ PDXDIAG_CONTEXT

Function Documentation

◆ D3DTests()

VOID D3DTests ( VOID  )

◆ DDTests()

VOID DDTests ( VOID  )

◆ DisplayPageWndProc()

INT_PTR CALLBACK DisplayPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 366 of file display.c.

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 */
388  DDTests();
389  else if (IDC_BUTTON_TEST3D == LOWORD(wParam))
390  D3DTests();
392  break;
393  }
394  break;
395  }
396  }
397 
398  return FALSE;
399 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define IDC_BUTTON_TESTDD
Definition: resource.h:54
#define SWP_NOZORDER
Definition: winuser.h:1232
#define SetWindowLongPtr
Definition: treelist.c:70
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
struct DXDIAG_CONTEXT * PDXDIAG_CONTEXT
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
#define SWP_NOSIZE
Definition: winuser.h:1230
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HWND hMainDialog
Definition: precomp.h:31
#define IDC_BUTTON_TEST3D
Definition: resource.h:55
VOID D3DTests()
Definition: d3dtest.c:73
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 GetWindowLongPtr
Definition: treelist.c:73
VOID DDTests()
Definition: ddtest.c:71
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

Referenced by InitializeDisplayAdapters().

◆ EnableDialogTheme()

BOOL EnableDialogTheme ( HWND  hwnd)

Definition at line 38 of file dxdiag.c.

39 {
40  HMODULE hUXTheme;
42 
43  hUXTheme = LoadLibraryA("uxtheme.dll");
44 
45  if(hUXTheme)
46  {
48  (ETDTProc)GetProcAddress(hUXTheme, "EnableThemeDialogTexture");
49 
51  {
53 
54  FreeLibrary(hUXTheme);
55  return TRUE;
56  }
57  else
58  {
59  // Failed to locate API!
60  FreeLibrary(hUXTheme);
61  return FALSE;
62  }
63  }
64  else
65  {
66  // Not running under XP? Just fail gracefully
67  return FALSE;
68  }
69 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define ETDT_ENABLETAB
Definition: dxdiag.c:30
#define FreeLibrary(x)
Definition: compat.h:405
static ETDTProc fnEnableThemeDialogTexture
Definition: uxthemesupp.c:15
HRESULT(WINAPI * ETDTProc)(HWND, DWORD)
Definition: dxdiag.c:33
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by DSEnumCallback(), InitializeDisplayAdapters(), InitializeTabCtrl(), and OnCreate().

◆ EnumerateDrivers()

VOID EnumerateDrivers ( PVOID  Context,
HDEVINFO  hList,
PSP_DEVINFO_DATA  pInfoData 
)

Definition at line 103 of file display.c.

104 {
105  HSPFILEQ hQueue;
107  SP_DRVINFO_DATA DriverInfoData;
108  DWORD Result;
109 
110  DeviceInstallParams.cbSize = sizeof(DeviceInstallParams);
112  return;
113 
114  DeviceInstallParams.FlagsEx |= (DI_FLAGSEX_INSTALLEDDRIVER | DI_FLAGSEX_ALLOWEXCLUDEDDRVS);
116  return;
117 
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);
135  {
136  SetupCloseFileQueue(hQueue);
137  return;
138  }
139 
140  DeviceInstallParams.FileQueue = hQueue;
141  DeviceInstallParams.Flags |= DI_NOVCP;
142 
144  {
145  SetupCloseFileQueue(hQueue);
146  return;
147  }
148 
150  {
151  SetupCloseFileQueue(hQueue);
152  return;
153  }
154 
155 
156  /* enumerate the driver files */
158  SetupCloseFileQueue(hQueue);
159 }
BOOL WINAPI SetupDiSetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
Definition: devinst.c:4563
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
BOOL WINAPI SetupScanFileQueueW(HSPFILEQ handle, DWORD flags, HWND window, PSP_FILE_CALLBACK_W handler, PVOID context, PDWORD result)
Definition: queue.c:1558
HSPFILEQ WINAPI SetupOpenFileQueue(VOID)
Definition: fileqsup.c:161
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION InstallFunction, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData)
Definition: devinst.c:4029
#define DI_FLAGSEX_ALLOWEXCLUDEDDRVS
Definition: setupapi.h:87
#define SPQ_SCAN_USE_CALLBACK
Definition: setupapi.h:614
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 DI_NOVCP
Definition: setupapi.h:49
smooth NULL
Definition: ftsmooth.c:416
_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
#define SetupDiSetDeviceInstallParams
Definition: setupapi.h:2614
unsigned long DWORD
Definition: ntddk_ex.h:95
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
HWND hList
Definition: livecd.c:10
BOOL WINAPI SetupDiBuildDriverInfoList(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN DWORD DriverType)
Definition: driver.c:718
#define SPDIT_CLASSDRIVER
Definition: setupapi.h:500
#define DIF_INSTALLDEVICEFILES
Definition: setupapi.h:140
BOOL WINAPI SetupCloseFileQueue(IN HSPFILEQ QueueHandle)
Definition: fileqsup.c:217

Referenced by DisplayPageSetDeviceDetails(), and SetDeviceDetails().

◆ GetCatFileFromDriverPath()

BOOL GetCatFileFromDriverPath ( LPWSTR  szFileName,
LPWSTR  szCatFileName 
)

◆ GetFileModifyTime()

BOOL GetFileModifyTime ( LPCWSTR  pFullPath,
WCHAR szTime,
int  szTimeSize 
)

Definition at line 15 of file display.c.

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  {
30  return FALSE;
31  }
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' ';
46 }
DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation)
Definition: timezone.c:262
#define CloseHandle
Definition: compat.h:398
TCHAR szTime[64]
Definition: solitaire.cpp:18
#define LOCALE_USER_DEFAULT
#define DATE_SHORTDATE
Definition: winnls.h:193
BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
Definition: timezone.c:377
smooth NULL
Definition: ftsmooth.c:416
#define OPEN_EXISTING
Definition: compat.h:426
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:178
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
static const WCHAR L[]
Definition: oid.c:1250
#define GENERIC_READ
Definition: compat.h:124
_In_ HANDLE hFile
Definition: mswsock.h:90
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:979
#define TIME_FORCE24HOURFORMAT
Definition: winnls.h:277
unsigned int UINT
Definition: ndis.h:50
#define CreateFileW
Definition: compat.h:400
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1079
BOOL WINAPI GetFileTime(IN HANDLE hFile, OUT LPFILETIME lpCreationTime OPTIONAL, OUT LPFILETIME lpLastAccessTime OPTIONAL, OUT LPFILETIME lpLastWriteTime OPTIONAL)
Definition: fileinfo.c:1046

Referenced by DriverFilesCallback().

◆ GetFileVersion()

BOOL GetFileVersion ( LPCWSTR  szAppName,
WCHAR szVer,
DWORD  szVerSize 
)

Definition at line 105 of file network.c.

106 {
107  UINT VerSize;
108  DWORD DummyHandle;
109  LPVOID pBuf;
110  WORD lang = 0;
111  WORD code = 0;
112  LPLANGANDCODEPAGE lplangcode;
113  WCHAR szBuffer[100];
114  WCHAR * pResult;
115  BOOL bResult = FALSE;
116  BOOL bVer;
117 
118  static const WCHAR wFormat[] = L"\\StringFileInfo\\%04x%04x\\FileVersion";
119  static const WCHAR wTranslation[] = L"VarFileInfo\\Translation";
120 
121  /* query version info size */
122  VerSize = GetFileVersionInfoSizeW(szAppName, &DummyHandle);
123  if (!VerSize)
124  return FALSE;
125 
126 
127  /* allocate buffer */
128  pBuf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, VerSize);
129  if (!pBuf)
130  return FALSE;
131 
132 
133  /* query version info */
134  if(!GetFileVersionInfoW(szAppName, 0, VerSize, pBuf))
135  {
136  HeapFree(GetProcessHeap(), 0, pBuf);
137  return FALSE;
138  }
139 
140  /* query lang code */
141  if(VerQueryValueW(pBuf, wTranslation, (LPVOID *)&lplangcode, &VerSize))
142  {
143  /* FIXME find language from current locale / if not available,
144  * default to english
145  * for now default to first available language
146  */
147  lang = lplangcode->lang;
148  code = lplangcode->code;
149  }
150  /* set up format */
151  wsprintfW(szBuffer, wFormat, lang, code);
152  /* query manufacturer */
153  pResult = NULL;
154  bVer = VerQueryValueW(pBuf, szBuffer, (LPVOID *)&pResult, &VerSize);
155 
156  if (VerSize < szVerSize && bVer && pResult)
157  {
158  wcscpy(szVer, pResult);
159  pResult = wcschr(szVer, L' ');
160  if (pResult)
161  {
162  /* cut off build info */
163  VerSize = (pResult - szVer);
164  }
165  if (GetLocaleInfoW(MAKELCID(lang, SORT_DEFAULT), LOCALE_SLANGUAGE, &szVer[VerSize], szVerSize-VerSize))
166  {
167  szVer[VerSize-1] = L' ';
168  szVer[szVerSize-1] = L'\0';
169  }
170  bResult = TRUE;
171  }
172 
173  HeapFree(GetProcessHeap(), 0, pBuf);
174  return bResult;
175 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define MAKELCID(lgid, srtid)
#define TRUE
Definition: types.h:120
#define LOCALE_SLANGUAGE
Definition: winnls.h:26
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: lang.c:1098
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR lang[]
Definition: wbemdisp.c:287
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SORT_DEFAULT
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
_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:1250
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:616
TCHAR szAppName[128]
Definition: solitaire.cpp:16
unsigned int UINT
Definition: ndis.h:50
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:850
#define HeapFree(x, y, z)
Definition: compat.h:394
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1054

Referenced by DriverFilesCallback(), and EnumerateServiceProviders().

◆ GetRegValue()

BOOL GetRegValue ( HKEY  hBaseKey,
LPWSTR  SubKey,
LPWSTR  ValueName,
DWORD  Type,
LPWSTR  Result,
DWORD  Size 
)

Definition at line 15 of file system.c.

16 {
17  HKEY hKey;
18  LONG res;
19  DWORD dwType;
20  DWORD dwSize;
21 
22  if (RegOpenKeyExW(hBaseKey, SubKey, 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
23  return FALSE;
24 
25  dwSize = Size;
26  res = RegQueryValueExW(hKey, ValueName, NULL, &dwType, (LPBYTE)Result, &dwSize);
27  RegCloseKey(hKey);
28 
29  if (res != ERROR_SUCCESS)
30  return FALSE;
31 
32  if (dwType != Type)
33  return FALSE;
34 
35  if (Size == sizeof(DWORD))
36  return TRUE;
37 
38  Result[(Size / sizeof(WCHAR))-1] = L'\0';
39  return TRUE;
40 }
#define TRUE
Definition: types.h:120
Type
Definition: Type.h:6
#define ERROR_SUCCESS
Definition: deptool.c:10
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
_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
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1250
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
GLuint res
Definition: glext.h:9613
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

Referenced by EnumerateServiceProviders(), GetBIOSValue(), GetDirectXVersion(), InitializeDialog(), and InitializeSystemPage().

◆ HelpPageWndProc()

INT_PTR CALLBACK HelpPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 13 of file help.c.

14 {
17  switch (message) {
18  case WM_INITDIALOG:
19  {
21  return TRUE;
22  }
23  case WM_COMMAND:
24  {
25  switch (LOWORD(wParam)) {
26  case IDC_BUTTON_SYSINFO:
27  break;
29  break;
30  }
31  break;
32  }
33  }
34 
35  return FALSE;
36 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define SWP_NOZORDER
Definition: winuser.h:1232
WPARAM wParam
Definition: combotst.c:138
#define IDC_BUTTON_DDRAW_REFRESH
Definition: resource.h:100
smooth NULL
Definition: ftsmooth.c:416
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define IDC_BUTTON_SYSINFO
Definition: resource.h:99
#define WM_COMMAND
Definition: winuser.h:1722
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

Referenced by InitializeTabCtrl().

◆ InitializeDirectSoundPage()

void InitializeDirectSoundPage ( PDXDIAG_CONTEXT  pContext)

Definition at line 265 of file sound.c.

266 {
267  HRESULT hResult;
268 
269 
270  /* create DSound object */
271 
272 // if (hResult != DS_OK)
273 // return;
274  hResult = DirectSoundEnumerateW(DSEnumCallback, pContext);
275 
276  /* release the DSound object */
277 // pObj->lpVtbl->Release(pObj);
278  (void)hResult;
279 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
BOOL CALLBACK DSEnumCallback(LPGUID lpGuid, LPCWSTR lpcstrDescription, LPCWSTR lpcstrModule, LPVOID lpContext)
Definition: sound.c:191
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
Definition: enum.c:210

Referenced by InitializeTabCtrl().

◆ InitializeDisplayAdapters()

void InitializeDisplayAdapters ( PDXDIAG_CONTEXT  pContext)

Definition at line 312 of file display.c.

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);
356 
357  hDlgs[pContext->NumDisplayAdapter] = hwndDlg;
358  pContext->NumDisplayAdapter++;
359  }
360 
361 
362 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
INT_PTR CALLBACK DisplayPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: display.c:366
#define TRUE
Definition: types.h:120
VOID InsertTabCtrlItem(HWND hDlgCtrl, INT Position, LPWSTR uId)
Definition: dxdiag.c:102
ULONG NumDisplayAdapter
Definition: precomp.h:33
#define ZeroMemory
Definition: winbase.h:1635
#define IDC_TAB_CONTROL
Definition: resource.h:16
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
_In_ DWORD _In_ DWORD dwOffset
Definition: ntgdi.h:2032
static const WCHAR szText[]
Definition: dialog.c:139
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI EnumDisplayDevicesW(LPCWSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags)
Definition: display.c:78
#define IDD_DISPLAY_DIALOG
Definition: resource.h:8
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define DISPLAY_DEVICE_MIRRORING_DRIVER
Definition: wingdi.h:1398
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
Definition: wingdi.h:1395
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1250
DWORD StateFlags
Definition: wingdi.h:2815
#define IDS_DISPLAY_DIALOG
Definition: resource.h:105
struct _DISPLAY_DEVICEW DISPLAY_DEVICEW
HINSTANCE hInst
Definition: dxdiag.c:13
#define HeapReAlloc
Definition: compat.h:393
HWND * hDisplayWnd
Definition: precomp.h:34
HWND hMainDialog
Definition: precomp.h:31
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL EnableDialogTheme(HWND hwnd)
Definition: dxdiag.c:38
static BOOL InitializeDialog(HWND hwndDlg, PDISPLAY_DEVICEW pDispDevice)
Definition: display.c:210

Referenced by InitializeTabCtrl().

◆ InputPageWndProc()

INT_PTR CALLBACK InputPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 207 of file input.c.

208 {
211  switch (message) {
212  case WM_INITDIALOG:
213  {
216  return TRUE;
217  }
218  }
219 
220  return FALSE;
221 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define SWP_NOZORDER
Definition: winuser.h:1232
static void InitializeDirectInputDialog(HWND hwndDlg)
Definition: input.c:185
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

Referenced by InitializeTabCtrl().

◆ InsertTabCtrlItem()

VOID InsertTabCtrlItem ( HWND  hDlgCtrl,
INT  Position,
LPWSTR  uId 
)

Definition at line 102 of file dxdiag.c.

103 {
104  WCHAR szName[100];
105  TCITEMW item;
106 
107  /* setup item info */
108  memset(&item, 0, sizeof(TCITEMW));
109  item.mask = TCIF_TEXT;
110 
111  /* load item name */
112  if (!HIWORD(uId))
113  {
114  szName[0] = L'\0';
115  if (!LoadStringW(hInst, LOWORD(uId), szName, 100))
116  return;
117  szName[99] = L'\0';
118  item.pszText = szName;
119  }
120  else
121  {
122  item.pszText = uId;
123  }
124 
125 
127 }
static COORD Position
Definition: mouse.c:34
#define TCIF_TEXT
Definition: commctrl.h:3943
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
LONG_PTR LPARAM
Definition: windef.h:208
#define TCM_INSERTITEM
Definition: commctrl.h:4021
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR L[]
Definition: oid.c:1250
HINSTANCE hInst
Definition: dxdiag.c:13
static ATOM item
Definition: dde.c:856
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static const WCHAR szName[]
Definition: msipriv.h:1194
#define HIWORD(l)
Definition: typedefs.h:246
#define memset(x, y, z)
Definition: compat.h:39
#define LOWORD(l)
Definition: pedump.c:82

Referenced by DSEnumCallback(), InitializeDisplayAdapters(), and InitializeTabCtrl().

◆ MusicPageWndProc()

INT_PTR CALLBACK MusicPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 13 of file music.c.

14 {
17  switch (message) {
18  case WM_INITDIALOG:
19  {
21  return TRUE;
22  }
23  }
24 
25  return FALSE;
26 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define SWP_NOZORDER
Definition: winuser.h:1232
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

Referenced by InitializeTabCtrl().

◆ NetworkPageWndProc()

INT_PTR CALLBACK NetworkPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 342 of file network.c.

343 {
346  switch (message) {
347  case WM_INITDIALOG:
348  {
351  return TRUE;
352  }
353  }
354 
355  return FALSE;
356 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define SWP_NOZORDER
Definition: winuser.h:1232
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
static void InitializeDirectPlayDialog(HWND hwndDlg)
Definition: network.c:306
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

Referenced by InitializeTabCtrl().

◆ SoundPageWndProc()

INT_PTR CALLBACK SoundPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 283 of file sound.c.

284 {
285  switch (message)
286  {
287  case WM_INITDIALOG:
288  {
290  return TRUE;
291  }
292  case WM_COMMAND:
293  {
295  {
296  return FALSE;
297  }
298  break;
299  }
300  }
301 
302  return FALSE;
303 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define SWP_NOZORDER
Definition: winuser.h:1232
WPARAM wParam
Definition: combotst.c:138
#define IDC_BUTTON_TESTDSOUND
Definition: resource.h:78
smooth NULL
Definition: ftsmooth.c:416
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_COMMAND
Definition: winuser.h:1722
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_INITDIALOG
Definition: winuser.h:1721
#define LOWORD(l)
Definition: pedump.c:82
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

Referenced by DSEnumCallback().

◆ SystemPageWndProc()

INT_PTR CALLBACK SystemPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 383 of file system.c.

384 {
387  switch (message)
388  {
389  case WM_INITDIALOG:
390  {
392  InitializeSystemPage(hDlg);
393  return TRUE;
394  }
395  }
396 
397  return FALSE;
398 }
static VOID InitializeSystemPage(HWND hwndDlg)
Definition: system.c:186
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define SWP_NOZORDER
Definition: winuser.h:1232
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

Referenced by CreatePropSheet(), InitializeTabCtrl(), and OnCreate().

Variable Documentation

◆ hInst

HINSTANCE hInst

Definition at line 13 of file dxdiag.c.