You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
477 B

  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. // +build windows
  5. package main
  6. import (
  7. "syscall"
  8. )
  9. // BUG(brainman): MessageBeep Windows api is broken on Windows 7,
  10. // so this example does not beep when runs as service on Windows 7.
  11. var (
  12. beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep")
  13. )
  14. func beep() {
  15. beepFunc.Call(0xffffffff)
  16. }