diff options
author | Alex Marsev <alex.marsev@gmail.com> | 2015-07-22 02:15:23 +0300 |
---|---|---|
committer | Alex Marsev <alex.marsev@gmail.com> | 2015-07-22 02:16:08 +0300 |
commit | 1f0ff1839dc456af2718a0722be3347665493008 (patch) | |
tree | 173d8c70c7632362cad12f5b9ad778fd075600bb /dll | |
parent | 979253a2940c61f7ca39f44ea235233d1de1286d (diff) |
Fix DllUnregisterServer() implementation
Now handles more errors.
Diffstat (limited to 'dll')
-rw-r--r-- | dll/src/sanear-dll/Entry.cpp | 14 |
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)
{
|