* Sync to trunk r63845.
[reactos.git] / base / applications / dxdiag / precomp.h
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
25 #include "resource.h"
26
27 typedef struct
28 {
29 HWND hMainDialog;
30 HWND hTabCtrl;
31 ULONG NumDisplayAdapter;
32 HWND * hDisplayWnd;
33 ULONG NumSoundAdapter;
34 HWND * hSoundWnd;
35 HWND hDialogs[5];
36 }DXDIAG_CONTEXT, *PDXDIAG_CONTEXT;
37
38 /* globals */
39 extern HINSTANCE hInst;
40
41 /* theming hack */
42 BOOL EnableDialogTheme(HWND hwnd);
43
44 /* dialog wnd proc */
45 INT_PTR CALLBACK SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
46 INT_PTR CALLBACK DisplayPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
47 INT_PTR CALLBACK SoundPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
48 INT_PTR CALLBACK MusicPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
49 INT_PTR CALLBACK InputPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
50 INT_PTR CALLBACK NetworkPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
51 INT_PTR CALLBACK HelpPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
52
53 /* DirectDraw tests */
54 VOID DDTests(VOID);
55
56 /* Direct3D tests */
57 VOID D3DTests(VOID);
58
59 /* DirectSound initialization */
60 void InitializeDirectSoundPage(PDXDIAG_CONTEXT pContext);
61
62 /* display adapter initialization */
63 void InitializeDisplayAdapters(PDXDIAG_CONTEXT pContext);
64
65 /* general functions */
66 BOOL GetFileVersion(LPCWSTR szAppName, WCHAR * szVer, DWORD szVerSize);
67 BOOL GetFileModifyTime(LPCWSTR pFullPath, WCHAR * szTime, int szTimeSize);
68 BOOL GetCatFileFromDriverPath(LPWSTR szFileName, LPWSTR szCatFileName);
69 BOOL GetRegValue(HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size);
70 VOID InsertTabCtrlItem(HWND hDlgCtrl, INT Position, LPWSTR uId);
71 VOID EnumerateDrivers(PVOID Context, HDEVINFO hList, PSP_DEVINFO_DATA pInfoData);
72
73 #endif /* PRECOMP_H__ */