summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-13 09:04:06 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-13 09:04:06 +0200
commit40847f14364a171d46ad287e8f296b60546d67d2 (patch)
tree4533c5d65b12dfcf9c31cc4688132f87e1e2d677 /platform/windows
parent86a836f9e3fbff913507286b2e00e3cc6c1f7478 (diff)
parentad4cc8682bb72c38ed47adf7fdfe2ba092221dd9 (diff)
Merge pull request #67318 from bruvzg/more_gcc_warn
[Windows] Fix more GCC MinGW warnings.
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/os_windows.cpp4
1 files changed, 3 insertions, 1 deletions
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<String> OS_Windows::get_video_adapter_driver_info() const {
if (hr != S_OK) {
return Vector<String>();
}
+ 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)