Beep в Windows 7
В Windows XP функция Beep пищала системным динамиком, но в «Семёрке» её поведение изменили, теперь звук перенаправляется на звуковую карту, что совсем не так весело.
Как выяснилось, пищать спикером всё ещё можно, но делать это придется напрямую (по ссылке пример на C#). Вот, если кому надо, то же самое, но на Delphi:
function Inp32(PortAdr: word): byte; stdcall; external 'inpout32.dll'; function Out32(PortAdr: word; Data: byte): byte; stdcall; external 'inpout32.dll'; procedure MyBeep(tone, duration: integer); var n,m: integer; begin if tone <> 0 then begin n := 1193180 div tone; Out32($43,182); Out32($42,n and $FF); Out32($42,(n shr 8) and $FF); m := Inp32($61); Out32($61,m or $03); end; Sleep(duration); m := Inp32($61); Out32($61,m and $FC); end;
Теперь пара слов об inpout32.dll. Скачать её можно отсюда, это модифицированная версия, которая, несмотря на название, работает и в x32 и в x64 редакциях Windows. Для прямого доступа к портам устанавливается драйвер, что накладывает ограничения:
- Программу в первый раз нужно запускать с правами администратора. Если планируется наличие установщика, то в конце установки можно запустить InstallDriver.exe.
- Пользователя нужно предупредить, так как многие антивирусы следят за установкой драйверов.
64-битная версия драйвера подписана, так что проблем с разрешением на установку не будет.
Комментарии
browsing your blog posts. In any case I'll be subscribing
to your feed and I hope youu write again soon! https://w4i9o.mssg.me/
I've joined your feed and loook forward to seeking more
of your excellent post. Also, I've shared your web site in my social networks! https://prefereplus.com/employ...tonebet-casino/
looking for. Wouuld you offer guest writers to write content for yourself?
I wouldn't mind writing a post or elaborating onn a
number oof the subjects you write cokncerning here.
Again, awesome site! https://Leicestercityplayers.Wordpress.com/
the standard information a person providse to your guests?
Is going too be again incessantly to inspect new posts https://Telegra.ph/Azurslot-On...ne-Casino-09-02
In any case I'll be subscribing to your rss fesed and I hope you write again soon! https://Penzu.com/public/80bb3167a9cc0e1b
I will bookmark your site and ake the feeds also?
I am satisfied to search out so many usefu information right here in the put up,
we'd like develop mode strategies on this regard, thank yyou foor sharing.
. . . . . https://justpaste.it/trustedonlinecasino1
information. https://proptidekho.com/author...loreenwile3077/
be at the internet the simplest thing to be mindful
of. I say to you, I definitely get irked at the same time as other people think about worries that they
just don't recognise about. You managed to hit the nail upon the top and outlined out the
entire thing without having side-effects , folks could take a signal.
Will probably be back to get more. Thank you http://zenithgrs.com/employer/euro-escort/
my site!I suppose its ok to use a few of your ideas!! https://realtyonegroupsurf.com...cathywilkinson/
I have a blog based upon on the same topics you discuss and would really like to have
you share some stories/information. I know my subscribers would value your work.
If you are even remotely interested, feel free to shoot me an email. https://Sarrbet.com/author/anitabrazier9/
since it offers feature contents, thanks https://Lcateam.com/employer/euro-escort/
It is pretty worth enough for me. In my view, if all website owners and bloggers made good content as you did, the web will be much more useful than ever before. https://Jobs1.Unifze.com/emplo...er/escort-girl/