golang 调用MessageBeep播放消息提示音 警示音 蜂鸣器beep

package main

import (
	"syscall"
	"time"
)

var (
	beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep")
)

func main() {
	beepFunc.Call(0xffffffff)
	time.Sleep(time.Second)
	beepFunc.Call(0x00000010)
	time.Sleep(time.Second)
	beepFunc.Call(0x00000040)
	time.Sleep(time.Second)
}
	


发表于:2017-12-28 10:48:55

原文链接(转载请保留): http://www.multisilicon.com/blog/a24275784.html

友情链接: MICROIC
首页