Skip to content

Instantly share code, notes, and snippets.

@dave-tucker
Created January 13, 2016 08:22
Show Gist options
  • Save dave-tucker/3133ccb90d3537a95fd8 to your computer and use it in GitHub Desktop.
Save dave-tucker/3133ccb90d3537a95fd8 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"syscall"
)
func main() {
var mod = syscall.NewLazyDLL("kernel32.dll")
var proc = mod.NewProc("IsProcessorFeaturePresent")
var PF_VIRT_FIRMWARE_ENABLED = 21
ret, _, _ := proc.Call(
uintptr(PF_VIRT_FIRMWARE_ENABLED),
)
fmt.Printf("Return: %d\n", ret)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment