Process Hacker
ntwin.h
Go to the documentation of this file.
1 #ifndef _NTWIN_H
2 #define _NTWIN_H
3 
4 // This header file provides access to Win32, plus NTSTATUS values.
5 
6 #define WIN32_LEAN_AND_MEAN
7 #define WIN32_NO_STATUS
8 #include <windows.h>
9 #undef WIN32_NO_STATUS
10 #include <ntstatus.h>
11 
12 #include <winioctl.h>
13 #include <shellapi.h>
14 #include <ole2.h>
15 #include <commdlg.h>
16 #include <wmistr.h>
17 
18 typedef GUID *PGUID;
19 
20 // Desktop access rights
21 #define DESKTOP_ALL_ACCESS \
22  (DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW | DESKTOP_ENUMERATE | \
23  DESKTOP_HOOKCONTROL | DESKTOP_JOURNALPLAYBACK | DESKTOP_JOURNALRECORD | \
24  DESKTOP_READOBJECTS | DESKTOP_SWITCHDESKTOP | DESKTOP_WRITEOBJECTS | \
25  STANDARD_RIGHTS_REQUIRED)
26 #define DESKTOP_GENERIC_READ \
27  (DESKTOP_ENUMERATE | DESKTOP_READOBJECTS | STANDARD_RIGHTS_READ)
28 #define DESKTOP_GENERIC_WRITE \
29  (DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW | DESKTOP_HOOKCONTROL | \
30  DESKTOP_JOURNALPLAYBACK | DESKTOP_JOURNALRECORD | DESKTOP_WRITEOBJECTS | \
31  STANDARD_RIGHTS_WRITE)
32 #define DESKTOP_GENERIC_EXECUTE \
33  (DESKTOP_SWITCHDESKTOP | STANDARD_RIGHTS_EXECUTE)
34 
35 // Window station access rights
36 #define WINSTA_GENERIC_READ \
37  (WINSTA_ENUMDESKTOPS | WINSTA_ENUMERATE | WINSTA_READATTRIBUTES | \
38  WINSTA_READSCREEN | STANDARD_RIGHTS_READ)
39 #define WINSTA_GENERIC_WRITE \
40  (WINSTA_ACCESSCLIPBOARD | WINSTA_CREATEDESKTOP | WINSTA_WRITEATTRIBUTES | \
41  STANDARD_RIGHTS_WRITE)
42 #define WINSTA_GENERIC_EXECUTE \
43  (WINSTA_ACCESSGLOBALATOMS | WINSTA_EXITWINDOWS | STANDARD_RIGHTS_EXECUTE)
44 
45 // WMI access rights
46 #define WMIGUID_GENERIC_READ \
47  (WMIGUID_QUERY | WMIGUID_NOTIFICATION | WMIGUID_READ_DESCRIPTION | \
48  STANDARD_RIGHTS_READ)
49 #define WMIGUID_GENERIC_WRITE \
50  (WMIGUID_SET | TRACELOG_CREATE_REALTIME | TRACELOG_CREATE_ONDISK | \
51  STANDARD_RIGHTS_WRITE)
52 #define WMIGUID_GENERIC_EXECUTE \
53  (WMIGUID_EXECUTE | TRACELOG_GUID_ENABLE | TRACELOG_LOG_EVENT | \
54  TRACELOG_ACCESS_REALTIME | TRACELOG_REGISTER_GUIDS | \
55  STANDARD_RIGHTS_EXECUTE)
56 
57 #endif