wmi icon indicating copy to clipboard operation
wmi copied to clipboard

Cannot load LoadPercentage

Open mpushki opened this issue 4 years ago • 4 comments

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)

mpushki avatar Jul 21 '21 08:07 mpushki

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

yusufpapurcu avatar Oct 03 '21 11:10 yusufpapurcu

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

mpushki avatar Oct 04 '21 13:10 mpushki

NOTE: This project is no longer being actively maintained.

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

tlimoncelli avatar Oct 05 '21 00:10 tlimoncelli

Thank you for information

mpushki avatar Oct 05 '21 11:10 mpushki