1// Copyright 2012 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// +build windows 6 7package main 8 9import ( 10 "syscall" 11) 12 13// BUG(brainman): MessageBeep Windows api is broken on Windows 7, 14// so this example does not beep when runs as service on Windows 7. 15 16var ( 17 beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep") 18) 19 20func beep() { 21 beepFunc.Call(0xffffffff) 22} 23