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