1 #pragma once
2 
3 #define WIN32_NO_STATUS
4 #define _INC_WINDOWS
5 #define COM_NO_WINDOWS_H
6 #define COBJMACROS
7 #include <tchar.h>
8 #include <stdarg.h>
9 
10 #include <windef.h>
11 #include <winbase.h>
12 #include <winreg.h>
13 #include <wingdi.h>
14 #include <winnls.h>
15 #include <winuser.h>
16 #include <wincon.h>
17 #include <richedit.h>
18 #include <shellapi.h>
19 #include <shlobj.h>
20 #include <shlwapi.h>
21 #include <stdio.h>
22 #include <strsafe.h>
23 #include <ndk/rtlfuncs.h>
24 #include <atlcoll.h>
25 #include <atlsimpcoll.h>
26 #include <atlstr.h>
27 #include <rappsmsg.h>
28 
29 #include "resource.h"
30 #include "winmain.h"
31 
32 #define APPLICATION_DATABASE_URL L"https://rapps.reactos.org/rappmgr2.cab"
33 #define APPLICATION_DATABASE_NAME L"rappmgr2.cab"
34 #define MAX_STR_LEN              256
35 
36 enum AppsCategories
37 {
38     ENUM_ALL_AVAILABLE,
39     ENUM_CAT_AUDIO,
40     ENUM_CAT_VIDEO,
41     ENUM_CAT_GRAPHICS,
42     ENUM_CAT_GAMES,
43     ENUM_CAT_INTERNET,
44     ENUM_CAT_OFFICE,
45     ENUM_CAT_DEVEL,
46     ENUM_CAT_EDU,
47     ENUM_CAT_ENGINEER,
48     ENUM_CAT_FINANCE,
49     ENUM_CAT_SCIENCE,
50     ENUM_CAT_TOOLS,
51     ENUM_CAT_DRIVERS,
52     ENUM_CAT_LIBS,
53     ENUM_CAT_THEMES,
54     ENUM_CAT_OTHER,
55     ENUM_CAT_SELECTED,
56     ENUM_ALL_INSTALLED,
57     ENUM_INSTALLED_APPLICATIONS = 31,
58     ENUM_UPDATES = 32,
59     ENUM_INSTALLED_MIN = ENUM_ALL_INSTALLED,
60     ENUM_INSTALLED_MAX = ENUM_UPDATES,
61     ENUM_AVAILABLE_MIN = ENUM_ALL_AVAILABLE,
62     ENUM_AVAILABLE_MAX = ENUM_CAT_SELECTED,
63 };
64 
65 inline BOOL IsAvailableEnum(INT x)
66 {
67     return (x >= ENUM_AVAILABLE_MIN && x <= ENUM_AVAILABLE_MAX);
68 }
69 
70 inline BOOL IsInstalledEnum(INT x)
71 {
72     return (x >= ENUM_INSTALLED_MIN && x <= ENUM_INSTALLED_MAX);
73 }
74