Beep [PC Speaker] and devctl()

How to control PC speaker with devctl() function? I know, there is “dcmd_misc.h” for it but I don’t know, how to use it. Could somebody give me simple example?

PS. I’ve seen thread http://www.openqnx.com/newsgroups/viewtopic.php?t=14293 but I don’t want to use low level functions like in8() and out8().