summaryrefslogtreecommitdiff
path: root/iax/dllmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'iax/dllmain.cpp')
-rw-r--r--iax/dllmain.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/iax/dllmain.cpp b/iax/dllmain.cpp
index fdeee19..86866c3 100644
--- a/iax/dllmain.cpp
+++ b/iax/dllmain.cpp
@@ -70,7 +70,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
return 0;
}
-HANDLE hModulesLoaded;
+int PreShutdown(WPARAM wParam, LPARAM lParam) {
+ DeinitIAXInterface();
+ return 0;
+}
+
+HANDLE hModulesLoaded, hPreShutdown;
extern "C" __declspec (dllexport) int __cdecl Load(PLUGINLINK *link) {
pluginLink=link;
@@ -114,6 +119,7 @@ extern "C" __declspec (dllexport) int __cdecl Load(PLUGINLINK *link) {
// hook modules loaded
hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ hPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
return 0;
}
@@ -122,6 +128,5 @@ extern "C" __declspec (dllexport) int __cdecl Unload(void) {
DeinitServices();
DeinitMenu();
DeinitIcons();
- DeinitIAXInterface();
return 0;
}