lfreist / hwinfo

cross platform C++ library for hardware information (CPU, RAM, GPU, ...)
MIT License
438 stars 76 forks source link

Implement available memory size module for Windows #35

Closed dmitr-fedorov closed 1 year ago

dmitr-fedorov commented 1 year ago

The previous implementation was returning -1 on Windows, so I fixed it. Also I changed the README for it to display the support of the new feature.

lfreist commented 1 year ago

The method worked fine as long as the WMI classes are available for the compiler. However, your implementation should be used when WMI is unavailable...

dmitr-fedorov commented 1 year ago

How can the WMI classes not be available for the compiler?

lfreist commented 1 year ago

I had similar issues when using MinGW for example

dmitr-fedorov commented 1 year ago

Can you test my implementation and see if it works for you?

lfreist commented 1 year ago

Hi! The fixed current version works for both, MSVC and MinGW.