Changeset 34e7428 in nscp for modules/CheckWMI/WMIQuery.cpp
- Timestamp:
- 07/01/08 06:39:49 (5 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- da1c7e1
- Parents:
- a720da5
- File:
-
- 1 edited
-
modules/CheckWMI/WMIQuery.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/CheckWMI/WMIQuery.cpp
rdff5db9 r34e7428 36 36 } 37 37 38 WMIQuery::result_type WMIQuery::execute(std::wstring query)38 WMIQuery::result_type WMIQuery::execute(std::wstring ns, std::wstring query) 39 39 { 40 40 result_type ret; … … 46 46 } 47 47 48 BSTR bstrNamespace = (_T("root\\cimv2"));48 CComBSTR strNamespace(ns.c_str()); 49 49 CComPtr< IWbemServices > service; 50 hr = locator->ConnectServer( bstrNamespace, NULL, NULL, NULL, WBEM_FLAG_CONNECT_USE_MAX_WAIT, NULL, NULL, &service );50 hr = locator->ConnectServer( strNamespace, NULL, NULL, NULL, WBEM_FLAG_CONNECT_USE_MAX_WAIT, NULL, NULL, &service ); 51 51 if (FAILED(hr)) { 52 52 throw WMIException(_T("ConnectServer failed!"), hr);
Note: See TracChangeset
for help on using the changeset viewer.








