Z
Z
zodiac2013-03-13 00:24:18
API
zodiac, 2013-03-13 00:24:18

Unload DLL after UnhookWindowsHookEx

When LoadLibrary, I set the following hook:
g_hHook = SetWindowsHookEx( WH_CBT, ( HOOKPROC )CBTHook, g_hInstance, 0 );

How can I make sure that when FreeLibrarymy application dll is unloaded from all programs in which it is loaded?
Simple doesn't do this ( UnhookWindowsHookEx(...)and DLL_PROCESS_DETACH according to msdn, it shouldn't).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman_Pekhov, 2013-03-28
@Roman_Pekhov

habrahabr.ru/post/174565/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question