From 43e97a8ede45ee1c469f9e275f58d50d740977df Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 30 Jun 2007 00:51:36 +0000 Subject: [PATCH] windows-procmgmt-library-20070629 Since the library creates its own background thread, the library must load its own reference to itself to prevent the library from being unloaded behind its back. --- src/procmgmt/procmgmt_nt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/procmgmt/procmgmt_nt.c b/src/procmgmt/procmgmt_nt.c index 83e923052..3b635785a 100644 --- a/src/procmgmt/procmgmt_nt.c +++ b/src/procmgmt/procmgmt_nt.c @@ -251,6 +251,7 @@ static DWORD WINAPI RemoteSignalListenerThread(LPVOID param) { HANDLE sigPipeHandle = (HANDLE) param; + HMODULE hLib = LoadLibrary("AFSPROCMGMT.DLL"); while (1) { /* wait for pipe client to connect */ @@ -296,6 +297,7 @@ RemoteSignalListenerThread(LPVOID param) } /* never reached */ + FreeLibrary(hLib); return (0); } -- 2.39.5