Skip to content

Commit

Permalink
test win
Browse files Browse the repository at this point in the history
  • Loading branch information
lfreist committed May 1, 2023
1 parent 9ee4b62 commit 929f3e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions examples/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ int main(int argc, char** argv) {
}
else {
std::cout << "No Batteries installed or detected" << std::endl;
std::cout << "mark 0\n" << std::endl;
}
std::cout << "mark 0.1\n" << std::endl;

std::cout << "mark 1\n";
std::vector<hwinfo::Disk> disks = hwinfo::getAllDisks();
Expand Down
5 changes: 0 additions & 5 deletions include/hwinfo/WMIwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <string>
#include <type_traits>
#include <vector>
#include <iostream>
#pragma comment(lib, "wbemuuid.lib")

namespace hwinfo {
Expand Down Expand Up @@ -67,7 +66,6 @@ inline bool queryWMI(const std::string& WMIClass, std::string field, std::vector
}
IWbemClassObject* pclsObj = nullptr;
ULONG uReturn = 0;
std::cout << "test0\n";
while (pEnumerator) {
pEnumerator->Next(WBEM_INFINITE, 1, &pclsObj, &uReturn);

Expand Down Expand Up @@ -95,9 +93,7 @@ inline bool queryWMI(const std::string& WMIClass, std::string field, std::vector
#if defined(__MINGW32__) || defined(__MINGW64__)
;
#else
std::cout << "test\n";
value.push_back((T)((bstr_t)vtProp.bstrVal).copy());
std::cout << "test2\n";
// BSTR val = SysAllocString(vtProp.bstrVal);
// value.push_back((bstr_t)val);
#endif
Expand All @@ -106,7 +102,6 @@ inline bool queryWMI(const std::string& WMIClass, std::string field, std::vector
VariantClear(&vtProp);
pclsObj->Release();
}
std::cout << "testxx\n";

if (value.empty()) {
value.resize(1);
Expand Down
2 changes: 2 additions & 0 deletions src/windows/disk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "hwinfo/disk.h"
#include "hwinfo/utils/stringutils.h"

#include <iostream>

namespace hwinfo {

// _____________________________________________________________________________________________________________________
Expand Down

0 comments on commit 929f3e0

Please sign in to comment.