summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-03-22 10:05:39 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-03-22 09:01:58 +0100
commit561cb62a5ac81053e89ec9bf1eed739801570c2d (patch)
tree15dd209a037283ff066dad01119f6c03bef563b8 /extensions
parent6c16dc217ef5cbe25166df7a3728ade12a148880 (diff)
Simplify CoCreateInstance / CoGetClassObject with COMReference
Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/config/WinUserInfo/WinUserInfoBe.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
index 2e97ab5581ac..9b721d50b36a 100644
--- a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
+++ b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
@@ -90,8 +90,8 @@ public:
{
sal::systools::CoInitializeGuard aCoInitializeGuard(COINIT_APARTMENTTHREADED);
- auto pADsys = sal::systools::COMReference<IADsADSystemInfo>().CoCreateInstance(
- CLSID_ADSystemInfo, nullptr, CLSCTX_INPROC_SERVER);
+ sal::systools::COMReference<IADsADSystemInfo> pADsys(CLSID_ADSystemInfo, nullptr,
+ CLSCTX_INPROC_SERVER);
smartBSTR sUserDN;
sal::systools::ThrowIfFailed(pADsys->get_UserName(&sUserDN.ptr), "get_UserName failed");