Invoke win32 API

Category:
InterOp
Description: invoke win23 API to beep on the computer. Please make sure you have sound card installed.
Code:
[]
extern bool MessageBeep(UInt32 beepType);

let InterOpSample1() =
let r = MessageBeep(0xFFFFFFFFu)
printfn "message beep result = %A" r

Execution Result:
message beep result = true

Last edited Sep 14, 2011 at 3:03 AM by ttliu2000, version 1

Comments

llioznov Oct 13, 2012 at 4:49 PM 
open System.Runtime.InteropServices

[<DllImport("user32.dll")>]
extern bool MessageBeep(UInt32 beepType);