Preserve staged helper builds and exclude hooks before attachment
This commit is contained in:
1 parent
0db42de77e
commit
989ecb681d
12 files changed
+267
-38
No files matched your search
@@ -72,6 +72,9 @@ int main(void) {
|
||||
pump(600);
|
||||
BOOL restored = GetForegroundWindow() == window && attached_on_focus(window);
|
||||
BOOL detached = !SendMessageW(worker_window, WM_APP, 0, 0);
|
||||
BOOL excluded = GetEnvironmentVariableA("WINE_ACCESS_EXPECT_NO_HOOKS", NULL, 0) != 0;
|
||||
BOOL loaded = GetModuleHandleW(L"wine-access-menu.dll") != NULL ||
|
||||
GetModuleHandleW(L"wine-access-menu32.dll") != NULL;
|
||||
printf("hook scope: initial=%d background=%d switched=%d old-thread=%d restored=%d detached=%d\n",
|
||||
first, background, switched, old_thread, restored, detached);
|
||||
PostMessageW(worker_window, WM_CLOSE, 0, 0);
|
||||
@@ -79,5 +82,9 @@ int main(void) {
|
||||
CloseHandle(thread);
|
||||
CloseHandle(ready);
|
||||
DestroyWindow(window);
|
||||
if (excluded) {
|
||||
printf("excluded process: hook DLL loaded=%d\n", loaded);
|
||||
return !first && !background && !switched && !old_thread && !restored && detached && !loaded ? 0 : 5;
|
||||
}
|
||||
return first && !background && switched && !old_thread && restored && detached ? 0 : 4;
|
||||
}
|
||||
Reference in new issue
Block a user