Created
July 16, 2014 11:15
-
-
Save stefanschneider/0740ea3c8a39c2e4809c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Win32_Process struct { | |
Name string | |
//SessionId uint32 | |
} | |
func main() { | |
//runtime.GOMAXPROCS(3) | |
//C.createThreadWithMsgLoop() | |
var dst []Win32_Process = make([]Win32_Process, 0, 0) | |
q := wmi.CreateQuery(&dst, "") | |
for { | |
//dst = make([]Win32_Process, 2, 4) | |
err := wmi.Query(q, &dst) | |
if err != nil { | |
//log.Fatal(err) | |
log.Println(err) | |
} | |
} | |
for i, v := range dst { | |
println(i, v.Name) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment