File tree Expand file tree Collapse file tree 4 files changed +16
-30
lines changed Expand file tree Collapse file tree 4 files changed +16
-30
lines changed Original file line number Diff line number Diff line change 23
23
<Keyword >Win32Proj</Keyword >
24
24
<ProjectGuid >{6cc17286-2fe3-4bcb-899b-76d1eacd3469}</ProjectGuid >
25
25
<RootNamespace >ConsoleLogonHook</RootNamespace >
26
- <WindowsTargetPlatformVersion >10.0.18362.0 </WindowsTargetPlatformVersion >
26
+ <WindowsTargetPlatformVersion >10.0</WindowsTargetPlatformVersion >
27
27
</PropertyGroup >
28
28
<Import Project =" $(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29
29
<PropertyGroup Condition =" '$(Configuration)|$(Platform)'=='Debug|Win32'" Label =" Configuration" >
118
118
<LanguageStandard >stdcpplatest</LanguageStandard >
119
119
<LanguageStandard_C >stdc17</LanguageStandard_C >
120
120
<AdditionalIncludeDirectories >$(ProjectDir);detours;imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories >
121
- <RuntimeLibrary >MultiThreadedDebugDLL </RuntimeLibrary >
121
+ <RuntimeLibrary >MultiThreadedDebug </RuntimeLibrary >
122
122
</ClCompile >
123
123
<Link >
124
124
<SubSystem >Windows</SubSystem >
142
142
<LanguageStandard >stdcpplatest</LanguageStandard >
143
143
<LanguageStandard_C >stdc17</LanguageStandard_C >
144
144
<AdditionalIncludeDirectories >$(ProjectDir);detours;imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories >
145
- <RuntimeLibrary >MultiThreadedDLL </RuntimeLibrary >
145
+ <RuntimeLibrary >MultiThreaded </RuntimeLibrary >
146
146
</ClCompile >
147
147
<Link >
148
148
<SubSystem >Windows</SubSystem >
Original file line number Diff line number Diff line change 11
11
12
12
namespace memory
13
13
{
14
+ inline const int VersionNumber = 104 ;
14
15
inline const std::string offsetCacheFileName = " ConsoleLogonHookOffsetCache.txt" ;
15
16
16
17
inline std::vector<std::pair<std::string, uintptr_t >> offsetCache;
@@ -53,6 +54,8 @@ namespace memory
53
54
54
55
std::ofstream file (offsetCacheFileName);
55
56
57
+ file << " VersionNumber" << " :" << VersionNumber << " \n " ;
58
+
56
59
for (int i = 0 ; i < offsetCache.size (); ++i)
57
60
{
58
61
file << offsetCache[i].first << " :" << offsetCache[i].second << " \n " ;
@@ -231,6 +234,12 @@ namespace memory
231
234
232
235
static void CheckCache ()
233
236
{
237
+ uintptr_t savedVersion = FindInOffsetCache (" VersionNumber" );
238
+ if (savedVersion != VersionNumber)
239
+ {
240
+ offsetCache.clear ();
241
+ SPDLOG_INFO (" Version Number does not match! clearing offset cache" );
242
+ }
234
243
// return;
235
244
// auto SecurityOptionsView__RuntimeClassIntialise = (uint8_t*)(baseaddress + 0x36EB4);
236
245
auto SecurityOptionsView__RuntimeClassIntialise = FindPatternCached<uint8_t *>(" SecurityOptionsViewRuntimeClassIntialise" , { " 55 56 57 41 56 41 57 48 8B EC 48 83 EC 30" });
Original file line number Diff line number Diff line change 23
23
<Keyword >Win32Proj</Keyword >
24
24
<ProjectGuid >{e624c20f-a41a-4bc5-b312-257ed4aecfb9}</ProjectGuid >
25
25
<RootNamespace >ConsoleLogonUI</RootNamespace >
26
- <WindowsTargetPlatformVersion >10.0.18362.0 </WindowsTargetPlatformVersion >
26
+ <WindowsTargetPlatformVersion >10.0</WindowsTargetPlatformVersion >
27
27
</PropertyGroup >
28
28
<Import Project =" $(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29
29
<PropertyGroup Condition =" '$(Configuration)|$(Platform)'=='Debug|Win32'" Label =" Configuration" >
115
115
<LanguageStandard >stdcpplatest</LanguageStandard >
116
116
<LanguageStandard_C >stdc17</LanguageStandard_C >
117
117
<AdditionalIncludeDirectories >$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories >
118
- <RuntimeLibrary >MultiThreadedDebugDLL </RuntimeLibrary >
118
+ <RuntimeLibrary >MultiThreadedDebug </RuntimeLibrary >
119
119
</ClCompile >
120
120
<Link >
121
121
<SubSystem >Windows</SubSystem >
137
137
<LanguageStandard >stdcpplatest</LanguageStandard >
138
138
<LanguageStandard_C >stdc17</LanguageStandard_C >
139
139
<AdditionalIncludeDirectories >$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories >
140
- <RuntimeLibrary >MultiThreadedDLL </RuntimeLibrary >
140
+ <RuntimeLibrary >MultiThreaded </RuntimeLibrary >
141
141
</ClCompile >
142
142
<Link >
143
143
<SubSystem >Windows</SubSystem >
Original file line number Diff line number Diff line change @@ -183,30 +183,7 @@ void duiManager::UnloadDUI()
183
183
auto pDuiManager = Get ();
184
184
185
185
UnregisterHotKey (pDuiManager->pWndHost ->GetHWND (), hotkeyid);
186
-
187
- if (pDuiManager->pUIElement )
188
- {
189
- pDuiManager->pUIElement ->DestroyAll (true );
190
- }
191
- if (pDuiManager->pWndElement )
192
- {
193
- pDuiManager->pWndElement ->DestroyAll (true );
194
-
195
- }
196
- if (pDuiManager->pWndHost )
197
- {
198
- pDuiManager->pWndHost ->DestroyWindow ();
199
- pDuiManager->pWndHost ->Destroy ();
200
- }
201
- if (pDuiManager->pParser )
202
- pDuiManager->pParser ->Destroy ();
203
-
204
- pDuiManager->pParser = NULL ;
205
- pDuiManager->pWndHost = NULL ;
206
- pDuiManager->pUIElement = NULL ;
207
- pDuiManager->pWndElement = NULL ;
208
- pDuiManager->pageContainerElement = NULL ;
209
-
186
+ pDuiManager->pWndHost ->DestroyWindow ();
210
187
211
188
DirectUI::UnInitThread ();
212
189
DirectUI::UnInitProcessPriv (0 );
You can’t perform that action at this time.
0 commit comments