PC Speaker aka "squeaker" vs Windows XP / Vista / 7 x64
I wanted to write myself an alarm clock that would work through PC Speaker, because I don’t want to leave the speakers on all night, but it wasn’t there! It turned out that from 64bit versions of Windows, the speaker’s support was just cut out.
How was supposed to "squeak"
We take the standard function
[DllImport("kernel32.dll")] public static extern bool Beep(int BeepFreq, int BeepDuration);
And then we call
Beep(500, 100);
It would seem, why difficult? So no, the infection squeaks through the speakers. We climb in MSDN
Remarks
Windows Vista x64 and Windows XP 64-Bit Edition: This function is not supported.
Here they took and sawed out support. ')
What else is strange, the device manager believes that the driver for the speaker is not corny, and when you try to update it says that the latest version is already installed.
Finally
I would like to ask the community about whether it is possible to get around this somehow, because there were no solutions in Google. If there is an answer, then a annoying alarm clock is waiting for you :)