Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/sanear.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dll
diff options
context:
space:
mode:
authorAlex Marsev <alex.marsev@gmail.com>2015-07-22 02:15:23 +0300
committerAlex Marsev <alex.marsev@gmail.com>2015-07-22 02:16:08 +0300
commit1f0ff1839dc456af2718a0722be3347665493008 (patch)
tree173d8c70c7632362cad12f5b9ad778fd075600bb /dll
parent979253a2940c61f7ca39f44ea235233d1de1286d (diff)
Fix DllUnregisterServer() implementation
Now handles more errors.
Diffstat (limited to 'dll')
-rw-r--r--dll/src/sanear-dll/Entry.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/dll/src/sanear-dll/Entry.cpp b/dll/src/sanear-dll/Entry.cpp
index 81a5ac0..84850cf 100644
--- a/dll/src/sanear-dll/Entry.cpp
+++ b/dll/src/sanear-dll/Entry.cpp
@@ -56,9 +56,19 @@ namespace
IFilterMapper2Ptr filterMapper;
ReturnIfFailed(CoCreateInstance(CLSID_FilterMapper2, nullptr,
CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&filterMapper)));
+ {
+ HRESULT result;
+
+ result = filterMapper->UnregisterFilter(nullptr, nullptr, *setupFilter.clsID);
+
+ if (FAILED(result))
+ ReturnIfNotEquals(result, 0x80070002);
- filterMapper->UnregisterFilter(nullptr, nullptr, *setupFilter.clsID);
- filterMapper->UnregisterFilter(&CLSID_AudioRendererCategory, nullptr, *setupFilter.clsID);
+ result = filterMapper->UnregisterFilter(&CLSID_AudioRendererCategory, nullptr, *setupFilter.clsID);
+
+ if (FAILED(result))
+ ReturnIfNotEquals(result, 0x80070002);
+ }
if (reg)
{