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

Can't query from Win32_VolumeChangeEvent #47

@qwerty22121998

Description

@qwerty22121998
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 :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions