Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Cannot load LoadPercentage #63

Open
mpushki opened this issue Jul 21, 2021 · 4 comments
Open

Cannot load LoadPercentage #63

mpushki opened this issue Jul 21, 2021 · 4 comments

Comments

@mpushki
Copy link

mpushki commented Jul 21, 2021

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
Copy link

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

@mpushki
Copy link
Author

mpushki commented Oct 4, 2021

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

@tlimoncelli
Copy link
Contributor

NOTE: This project is no longer being actively maintained.

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

@mpushki
Copy link
Author

mpushki commented Oct 5, 2021

Thank you for information

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants