首页 > Web开发 > 详细

TWebBrowser静音

时间:2015-04-18 23:34:13      阅读:328      评论:0      收藏:0      [点我收藏+]
procedure TForm1.FormCreate(Sender: TObject);
var
  hDSound: Cardinal;
  pDirectSoundCreate: Pointer;
  hWinmm: Cardinal;
  pmidiStreamOpen: Pointer;
  pwaveOutWrite: Pointer;
  lp: Cardinal;
begin
  hDSound := LoadLibrary(‘DSound.dll‘);
  if hDSound > 0 then
    pDirectSoundCreate := GetProcAddress(hDSound, ‘DirectSoundCreate‘);
  if pDirectSoundCreate <> nil then
  begin
    VirtualProtect(pDirectSoundCreate, 3, PAGE_EXECUTE_READWRITE, lp);
    Move(#$C2#$0C#$00, pDirectSoundCreate^, 3);
  end;
 
  hWinmm := LoadLibrary(‘Winmm.dll‘);
  if hWinmm > 0 then
    pmidiStreamOpen := GetProcAddress(hWinmm, ‘midiStreamOpen‘);
  if pmidiStreamOpen <> nil then
  begin
    VirtualProtect(pmidiStreamOpen, 3, PAGE_EXECUTE_READWRITE, lp);
    Move(#$C2#$04#$00, pmidiStreamOpen^, 3);
  end;
 
  if hWinmm > 0 then
    pwaveOutWrite := GetProcAddress(hWinmm, ‘waveOutWrite‘);
  if pwaveOutWrite <> nil then
  begin
    VirtualProtect(pwaveOutWrite, 3, PAGE_EXECUTE_READWRITE, lp);
    Move(#$C2#$0C#$00, pwaveOutWrite^, 3);
  end;
end;

TWebBrowser静音

原文:http://www.cnblogs.com/honeynm/p/4438291.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!