xref: /reactos/base/applications/dxdiag/precomp.h (revision 58aee30e)
1 #ifndef PRECOMP_H__
2 #define PRECOMP_H__
3 
4 #define DIRECTINPUT_VERSION 0x0800
5 #define DIRECTSOUND_VERSION 0x0800
6 #define D3D_OVERLOADS
7 
8 #include <stdarg.h>
9 
10 #define WIN32_NO_STATUS
11 #define _INC_WINDOWS
12 #define COM_NO_WINDOWS_H
13 #include <stdarg.h>
14 #include <windef.h>
15 #include <winbase.h>
16 #include <winreg.h>
17 #include <wingdi.h>
18 #include <winnls.h>
19 #include <winuser.h>
20 #include <setupapi.h>
21 #include <ddraw.h>
22 #include <initguid.h>
23 #include <devguid.h>
24 #include <strsafe.h>
25 #include <udmihelp.h>
26 
27 #include "resource.h"
28 
29 typedef struct
30 {
31     HWND hMainDialog;
32     HWND hTabCtrl;
33     ULONG NumDisplayAdapter;
34     HWND * hDisplayWnd;
35     ULONG NumSoundAdapter;
36     HWND * hSoundWnd;
37     HWND hDialogs[5];
38 }DXDIAG_CONTEXT, *PDXDIAG_CONTEXT;
39 
40 /* globals */
41 extern HINSTANCE hInst;
42 
43 /* theming hack */
44 BOOL EnableDialogTheme(HWND hwnd);
45 
46 /* dialog wnd proc */
47 INT_PTR CALLBACK SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
48 INT_PTR CALLBACK DisplayPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
49 INT_PTR CALLBACK SoundPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
50 INT_PTR CALLBACK MusicPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
51 INT_PTR CALLBACK InputPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
52 INT_PTR CALLBACK NetworkPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
53 INT_PTR CALLBACK HelpPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
54 
55 /* DirectDraw tests */
56 VOID DDTests(VOID);
57 
58 /* Direct3D tests */
59 VOID D3DTests(VOID);
60 
61 /* DirectSound initialization */
62 void InitializeDirectSoundPage(PDXDIAG_CONTEXT pContext);
63 
64 /* display adapter initialization */
65 void InitializeDisplayAdapters(PDXDIAG_CONTEXT pContext);
66 
67 /* general functions */
68 BOOL GetFileVersion(LPCWSTR szAppName, WCHAR * szVer, DWORD szVerSize);
69 BOOL GetFileModifyTime(LPCWSTR pFullPath, WCHAR * szTime, int szTimeSize);
70 BOOL GetCatFileFromDriverPath(LPWSTR szFileName, LPWSTR szCatFileName);
71 BOOL GetRegValue(HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size);
72 VOID InsertTabCtrlItem(HWND hDlgCtrl, INT Position, LPWSTR uId);
73 VOID EnumerateDrivers(PVOID Context, HDEVINFO hList, PSP_DEVINFO_DATA pInfoData);
74 
75 #endif /* PRECOMP_H__ */
76