|
126 | 126 |
|
127 | 127 | g_hookThreadId.store(GetCurrentThreadId()); |
128 | 128 | m_pluginErrorMessage.reset(); |
129 | | - auto cleanup = wil::scope_exit([&] { |
130 | | - g_hookThreadId.store(0); |
131 | | - }); |
| 129 | + auto cleanup = wil::scope_exit([&] { g_hookThreadId.store(0); }); |
132 | 130 |
|
133 | 131 | HRESULT hr = m_hooks.OnVMStarted(&ctx.info, &settings); |
134 | 132 |
|
|
154 | 152 | auto ctx = BuildSessionContext(SessionId, UserToken, SidSize, SidData); |
155 | 153 |
|
156 | 154 | g_hookThreadId.store(GetCurrentThreadId()); |
157 | | - auto cleanup = wil::scope_exit([&] { |
158 | | - g_hookThreadId.store(0); |
159 | | - }); |
| 155 | + auto cleanup = wil::scope_exit([&] { g_hookThreadId.store(0); }); |
160 | 156 |
|
161 | 157 | HRESULT hr = m_hooks.OnVMStopping(&ctx.info); |
162 | 158 |
|
|
199 | 195 |
|
200 | 196 | g_hookThreadId.store(GetCurrentThreadId()); |
201 | 197 | m_pluginErrorMessage.reset(); |
202 | | - auto cleanup = wil::scope_exit([&] { |
203 | | - g_hookThreadId.store(0); |
204 | | - }); |
| 198 | + auto cleanup = wil::scope_exit([&] { g_hookThreadId.store(0); }); |
205 | 199 |
|
206 | 200 | HRESULT hr = m_hooks.OnDistributionStarted(&ctx.info, &distro); |
207 | 201 |
|
|
246 | 240 | distro.Version = Version ? Version : L""; |
247 | 241 |
|
248 | 242 | g_hookThreadId.store(GetCurrentThreadId()); |
249 | | - auto cleanup = wil::scope_exit([&] { |
250 | | - g_hookThreadId.store(0); |
251 | | - }); |
| 243 | + auto cleanup = wil::scope_exit([&] { g_hookThreadId.store(0); }); |
252 | 244 |
|
253 | 245 | HRESULT hr = m_hooks.OnDistributionStopping(&ctx.info, &distro); |
254 | 246 |
|
|
283 | 275 | distro.Version = Version ? Version : L""; |
284 | 276 |
|
285 | 277 | g_hookThreadId.store(GetCurrentThreadId()); |
286 | | - auto cleanup = wil::scope_exit([&] { |
287 | | - g_hookThreadId.store(0); |
288 | | - }); |
| 278 | + auto cleanup = wil::scope_exit([&] { g_hookThreadId.store(0); }); |
289 | 279 |
|
290 | 280 | HRESULT hr = m_hooks.OnDistributionRegistered(&ctx.info, &distro); |
291 | 281 |
|
|
320 | 310 | distro.Version = Version ? Version : L""; |
321 | 311 |
|
322 | 312 | g_hookThreadId.store(GetCurrentThreadId()); |
323 | | - auto cleanup = wil::scope_exit([&] { |
324 | | - g_hookThreadId.store(0); |
325 | | - }); |
| 313 | + auto cleanup = wil::scope_exit([&] { g_hookThreadId.store(0); }); |
326 | 314 |
|
327 | 315 | HRESULT hr = m_hooks.OnDistributionUnregistered(&ctx.info, &distro); |
328 | 316 |
|
|
0 commit comments