From ad4cc8682bb72c38ed47adf7fdfe2ba092221dd9 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 12 Oct 2022 20:17:49 +0300 Subject: [Windows] Fix GCC MinGW warnings. --- platform/windows/os_windows.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'platform/windows') diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 5e4ba4a9e3..5ca064e523 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -331,8 +331,10 @@ Vector OS_Windows::get_video_adapter_driver_info() const { if (hr != S_OK) { return Vector(); } + BSTR resource_name = SysAllocString(L"root\\CIMV2"); + hr = wbemLocator->ConnectServer(resource_name, NULL, NULL, NULL, 0, NULL, NULL, &wbemServices); + SysFreeString(resource_name); - hr = wbemLocator->ConnectServer(L"root\\CIMV2", NULL, NULL, 0, NULL, 0, 0, &wbemServices); SAFE_RELEASE(wbemLocator) // from now on, use `wbemServices` if (hr != S_OK) { SAFE_RELEASE(wbemServices) -- cgit v1.2.3