1| // native_bridge/src/gui_probe.cpp — standalone VST3 GUI attach probe. 2| // Debug tool (NOT shipped with the DAW): loads a VST3 with Vst3Instrument and 3| // tests openGUI under different thread/pump/parent-window setups so we can 4| // find why view->attached() hangs inside the bridge. 5| #include "Vst3Instrument.h" 6| 7| #ifdef _WIN32 8| #include 9| #include 10| #endif 11| #include 12| #include 13| #include 14| #include 15| #include 16| #include 17| #include 18| #include 19| #include 20| #include 21| #include 22| 23| #ifdef _WIN32 24| static void probe_invalid_param(const wchar_t* expr, const wchar_t* func, const wchar_t* file, 25| unsigned int line, uintptr_t reserved) { 26| printf("[probe] INVALID_PARAMETER expr=%ls func=%ls\n", expr ? expr : L"null", func ? func : L"null"); 27| fflush(stdout); 28| } 29| #endif 30| 31| static void disable_ime_contexts(HWND w) { 32| if (w && IsWindow(w)) { 33| ImmAssociateContext(w, nullptr); 34| for (HWND c = GetWindow(w, GW_CHILD); c; c = GetWindow(c, GW_HWNDNEXT)) 35| ImmAssociateContext(c, nullptr); 36| } 37| } 38| 39| static void pump_for(int secs) { 40| #ifdef _WIN32