Process Hacker
settings.h
Go to the documentation of this file.
1 #ifndef PH_SETTINGS_H
2 #define PH_SETTINGS_H
3 
4 // begin_phapppub
5 typedef enum _PH_SETTING_TYPE
6 {
11 // end_phapppub
12 
13 typedef struct _PH_SETTING
14 {
18 
19  union
20  {
21  PVOID Pointer;
22  ULONG Integer;
24  } u;
26 
28  VOID
29  );
30 
32  VOID
33  );
34 
35 // begin_phapppub
37 _May_raise_ ULONG
38 NTAPI
40  _In_ PWSTR Name
41  );
42 
45 NTAPI
47  _In_ PWSTR Name
48  );
49 
52 NTAPI
54  _In_ PWSTR Name
55  );
56 
59 NTAPI
61  _In_ PWSTR Name,
62  _In_ ULONG Value
63  );
64 
67 NTAPI
69  _In_ PWSTR Name,
70  _In_ PH_INTEGER_PAIR Value
71  );
72 
75 NTAPI
77  _In_ PWSTR Name,
78  _In_ PWSTR Value
79  );
80 
83 NTAPI
85  _In_ PWSTR Name,
86  _In_ PPH_STRINGREF Value
87  );
88 // end_phapppub
89 
91  VOID
92  );
93 
95  VOID
96  );
97 
98 NTSTATUS PhLoadSettings(
99  _In_ PWSTR FileName
100  );
101 
102 NTSTATUS PhSaveSettings(
103  _In_ PWSTR FileName
104  );
105 
107  VOID
108  );
109 
110 #define PhaGetStringSetting(Name) ((PPH_STRING)PhAutoDereferenceObject(PhGetStringSetting(Name))) // phapppub
111 
112 // begin_phapppub
113 // High-level settings creation
114 
115 typedef struct _PH_SETTING_CREATE
116 {
118  PWSTR Name;
121 
122 PHAPPAPI
123 VOID
124 NTAPI
126  _In_ PPH_SETTING_CREATE Settings,
127  _In_ ULONG NumberOfSettings
128  );
129 // end_phapppub
130 
131 // Cached settings
132 
133 #undef EXT
134 
135 #ifdef PH_SETTINGS_PRIVATE
136 #define EXT
137 #else
138 #define EXT extern
139 #endif
140 
148 
191 
192 #define PH_SET_INTEGER_CACHED_SETTING(Name, Value) (PhSetIntegerSetting(L#Name, PhCs##Name = (Value)))
193 
194 #endif