unhookwindowshookex

Unloading DLL from all processes after unhooking global CBT hook

How do you properly unload a DLL from all processes when the system-wide hook that loaded them gets unloaded? From MSDN: You can release a global hook procedure by using UnhookWindowsHookEx, but this function does not free the DLL containing the hook procedure. This is because global hook procedures are called in the pr...