From 5b0119413bc18e634cab684f296f58faf0169a81 Mon Sep 17 00:00:00 2001 From: chenxianghui1130 Date: Sat, 29 Aug 2026 12:13:14 +0800 Subject: [PATCH] Windows: Keep ZDSR DLL loaded during shutdown ZDSR may still execute asynchronous code while Prism shuts down. Unloading its delay-loaded DLL at that point causes intermittent access violations in the host process. Signed-off-by: chenxianghui1130 --- source/prism.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/prism.cpp b/source/prism.cpp index 5614bb6..7510343 100644 --- a/source/prism.cpp +++ b/source/prism.cpp @@ -169,12 +169,10 @@ PRISM_API void PRISM_CALL prism_shutdown(PrismContext *ctx) { #endif delete ctx; #ifdef _WIN32 - (void)__FUnloadDelayLoadedDLL2("ZDSRAPI.dll"); (void)__FUnloadDelayLoadedDLL2("byctrl.dll"); (void)__FUnloadDelayLoadedDLL2("PCTKUSR.dll"); (void)__FUnloadDelayLoadedDLL2("prism_orca_bridge.dll"); (void)__FUnloadDelayLoadedDLL2("prism_speech_dispatcher_bridge.dll"); - (void)__FUnloadDelayLoadedDLL2("ZDSRAPI_x64.dll"); (void)__FUnloadDelayLoadedDLL2("byctrl-x64.dll"); #endif }