Open qwerty22121998 opened 5 years ago
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 :(
but the result always be empty. when the example run well, i don't know why :(