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

Can't query from Win32_VolumeChangeEvent #47

Open
qwerty22121998 opened this issue Jan 22, 2019 · 0 comments
Open

Can't query from Win32_VolumeChangeEvent #47

qwerty22121998 opened this issue Jan 22, 2019 · 0 comments

Comments

@qwerty22121998
Copy link

type Win32_VolumeChangeEvent struct {
	EventType uint16
	DriveName string
}

func main() {
	var dst []Win32_VolumeChangeEvent
	q := wmi.CreateQuery(&dst, "")
	fmt.Println(q)

	for {
		err := wmi.Query(q, &dst)
		if err != nil {
			log.Fatal(err)
		}
		if len(dst) == 0 {
			continue
		}
		for _, v := range dst {
			fmt.Println(v)
		}

	}
}

but the result always be empty. when the example run well, i don't know why :(

@qwerty22121998 qwerty22121998 changed the title Can't quert from Win32_VolumeChangeEvent Can't query from Win32_VolumeChangeEvent Jan 22, 2019
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

1 participant