diff options
Diffstat (limited to 'ui/Taskbar_Seven/taskbar.cpp')
-rw-r--r-- | ui/Taskbar_Seven/taskbar.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/Taskbar_Seven/taskbar.cpp b/ui/Taskbar_Seven/taskbar.cpp index 6b34fc1a..72be7016 100644 --- a/ui/Taskbar_Seven/taskbar.cpp +++ b/ui/Taskbar_Seven/taskbar.cpp @@ -31,7 +31,10 @@ ComPtr<ITaskbarList3> getInstance() CLSCTX_ALL, IID_PPV_ARGS(taskbarlist.init())); if (FAILED(hr)) - lastErrorMessage = generateErrorMsg(L"Error calling \"CoCreateInstance\".", hr); + { + lastErrorMessage = formatComError(L"Error calling \"CoCreateInstance\".", hr); + return ComPtr<ITaskbarList3>(); + } return taskbarlist; } @@ -70,7 +73,7 @@ bool tbseven::setStatus(void* hwnd, //HWND: window assciated to the taskbar icon flag); //[in] TBPFLAG tbpFlags if (FAILED(hr)) { - lastErrorMessage = generateErrorMsg(L"Error calling \"SetProgressState\".", hr); + lastErrorMessage = formatComError(L"Error calling \"SetProgressState\".", hr); return false; } @@ -92,7 +95,7 @@ bool tbseven::setProgress(void* hwnd, //HWND: window assciated to the taskbar ic total); //[in] ULONGLONG ullTotal if (FAILED(hr)) { - lastErrorMessage = generateErrorMsg(L"Error calling \"SetProgressValue\".", hr); + lastErrorMessage = formatComError(L"Error calling \"SetProgressValue\".", hr); return false; } |