1 #ifndef APPHELP_APITEST_H
2 #define APPHELP_APITEST_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 /* data.c */
9 void test_create_db_imp(const WCHAR* name, int win10);
10 DWORD test_get_db_size();
11 void test_create_exe_imp(const WCHAR* name, int skip_rsrc_exports);
12 void test_create_file_imp(const WCHAR* name, const char* contents, size_t len);
13 void test_create_ne_imp(const WCHAR* name, int skip_names);
14 DWORD get_host_winver(void);
15 DWORD get_module_version(HMODULE mod);
16 void silence_debug_output(void);        // Silence output if the environment variable is not set.
17 
18 #define test_create_db      (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : test_create_db_imp
19 #define test_create_exe     (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : test_create_exe_imp
20 #define test_create_file    (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : test_create_file_imp
21 #define test_create_ne      (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : test_create_ne_imp
22 
23 /* register.cpp */
24 BOOL IsUserAdmin(VOID);
25 
26 extern DWORD g_WinVersion;
27 
28 #define WINVER_ANY     0
29 #define WINVER_WINXP   0x0501
30 #define WINVER_2003    0x0502
31 #define WINVER_VISTA   0x0600
32 #define WINVER_WIN7    0x0601
33 #define WINVER_WIN8    0x0602
34 #define WINVER_WIN10   0x0a00
35 
36 
37 typedef WORD TAG;
38 typedef DWORD TAGID;
39 typedef DWORD TAGREF;
40 typedef UINT64 QWORD;
41 typedef VOID* PDB;
42 typedef VOID* HSDB;
43 typedef INT PATH_TYPE;
44 
45 
46 #define SDB_MAX_SDBS 16
47 #define SDB_MAX_EXES_VISTA 16
48 #define SDB_MAX_LAYERS 8
49 #define SHIMREG_DISABLE_LAYER (0x00000020)
50 
51 #define SDBQUERYRESULT_EXPECTED_SIZE_VISTA    456
52 
53 typedef struct tagSDBQUERYRESULT_VISTA
54 {
55     TAGREF atrExes[SDB_MAX_EXES_VISTA];
56     DWORD  adwExeFlags[SDB_MAX_EXES_VISTA];
57     TAGREF atrLayers[SDB_MAX_LAYERS];
58     DWORD  dwLayerFlags;
59     TAGREF trApphelp;
60     DWORD  dwExeCount;
61     DWORD  dwLayerCount;
62     GUID   guidID;
63     DWORD  dwFlags;
64     DWORD  dwCustomSDBMap;
65     GUID   rgGuidDB[SDB_MAX_SDBS];
66 } SDBQUERYRESULT_VISTA, *PSDBQUERYRESULT_VISTA;
67 
68 #define SDBQUERYRESULT_EXPECTED_SIZE_2k3    344
69 
70 #define SDB_MAX_EXES_2k3    4
71 
72 typedef struct tagSDBQUERYRESULT_2k3
73 {
74     TAGREF atrExes[SDB_MAX_EXES_2k3];
75     TAGREF atrLayers[SDB_MAX_LAYERS];
76     DWORD  dwLayerFlags;
77     TAGREF trApphelp;       // probably?
78     DWORD  dwExeCount;
79     DWORD  dwLayerCount;
80     GUID   guidID;          // probably?
81     DWORD  dwFlags;         // probably?
82     DWORD  dwCustomSDBMap;
83     GUID   rgGuidDB[SDB_MAX_SDBS];
84 } SDBQUERYRESULT_2k3, *PSDBQUERYRESULT_2k3;
85 
86 C_ASSERT(sizeof(SDBQUERYRESULT_VISTA) == SDBQUERYRESULT_EXPECTED_SIZE_VISTA);
87 C_ASSERT(sizeof(SDBQUERYRESULT_2k3) == SDBQUERYRESULT_EXPECTED_SIZE_2k3);
88 
89 
90 #ifdef __cplusplus
91 } // extern "C"
92 #endif
93 
94 #endif // APPHELP_APITEST_H
95