From 90b60031df466f2b7bc05a5ec1eb29cab59d14d8 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 23 Feb 2017 11:04:57 +0100 Subject: [PATCH] Incorrect `CoCreateInstance()` result evaluation fixed --- include/WinStd/COM.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/WinStd/COM.h b/include/WinStd/COM.h index 775650da..b083a69a 100644 --- a/include/WinStd/COM.h +++ b/include/WinStd/COM.h @@ -83,7 +83,7 @@ namespace winstd { handle_type h; HRESULT hr = CoCreateInstance(rclsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&h); - if (SUCCEEDED(h)) + if (SUCCEEDED(hr)) attach(h); return hr; }