StackExchange / wmi

WMI for Go
http://godoc.org/github.com/StackExchange/wmi
MIT License
433 stars 173 forks source link

Cannot load LoadPercentage #63

Open mpushki opened 3 years ago

mpushki commented 3 years ago

I have a script with next part:

type Win32_Processor struct {
    LoadPercentage            uint16
    L2CacheSize               uint32
    Family                    uint16
    Manufacturer              string
    Name                      string
    NumberOfLogicalProcessors uint32
    ProcessorId               string
    Stepping                  *string
    MaxClockSpeed             uint32
}
....
        var dst []Win32_Processor
    q := wmi.CreateQuery(&dst, "")
    err := wmi.Query(q, &dst)
    fmt.Println(err)

And when this script is called too often (~26 iteration) I get error: wmi cannot load field "loadpercentage" into a "uint16" unsupported type (<nil>) Could you please help, why I get this error?

I use GoLang 1.16, Windows 10(64)

yusufpapurcu commented 2 years ago

Does this error exist in go1.17? I can't reproduce error in my workspace(Go 1.17.1 & Windows 10 x64).

mpushki commented 2 years ago

This tool cannot support Go 1.16? Unfortunately I cannot update golang right now to check it

tlimoncelli commented 2 years ago

NOTE: This project is no longer being actively maintained.

We recommend you refer to this fork: https://github.com/yusufpapurcu/wmi

mpushki commented 2 years ago

Thank you for information