执行下面代码后,系统停止反映。鼠标不能动了 程序一直占内存
procedure TSniffer.monitorendClick(Sender: TObject);
type
tipMonitorEnd = procedure(); stdcall;
var
fipmonitorend: tipmonitorend;
hDll: Thandle;
begin
hDll := LoadLibrary('SocketInit.dll');
if hDll = 0 then
Exit;
if monitorstart.enabled then exit;
fipMonitorend := TipMonitorend(GetProcAddress(hDll, 'MonitorEnd'));
if @fipMonitorend = nil then
begin
showmessage('error');
Exit;
end
else
begin
fipMonitorend();
monitorstart.Enabled:=true;
end;end;
procedure TSniffer.monitorendClick(Sender: TObject);
type
tipMonitorEnd = procedure(); stdcall;
var
fipmonitorend: tipmonitorend;
hDll: Thandle;
begin
hDll := LoadLibrary('SocketInit.dll');
if hDll = 0 then
Exit;
if monitorstart.enabled then exit;
fipMonitorend := TipMonitorend(GetProcAddress(hDll, 'MonitorEnd'));
if @fipMonitorend = nil then
begin
showmessage('error');
Exit;
end
else
begin
fipMonitorend();
monitorstart.Enabled:=true;
end;end;
procedure TSniffer.monitorendClick(Sender: TObject);
type
tipMonitorEnd = procedure(); stdcall;
var
fipmonitorend: tipmonitorend;
hDll: Thandle;
begin
hDll := LoadLibrary('SocketInit.dll');
if hDll = 0 then
Exit;
if monitorstart.enabled then exit;
fipMonitorend := TipMonitorend(GetProcAddress(hDll, 'MonitorEnd'));
if @fipMonitorend = nil then
begin
showmessage('error');
Exit;
end
else
begin
fipMonitorend();
monitorstart.Enabled:=true;
end;end;
procedure TSniffer.monitorendClick(Sender: TObject);
type
tipMonitorEnd = procedure(); stdcall;
var
fipmonitorend: tipmonitorend;
hDll: Thandle;
begin
hDll := LoadLibrary('SocketInit.dll');
if hDll = 0 then
Exit;
if monitorstart.enabled then exit;
fipMonitorend := TipMonitorend(GetProcAddress(hDll, 'MonitorEnd'));
if @fipMonitorend = nil then
begin
showmessage('error');
Exit;
end
else
begin
fipMonitorend();
monitorstart.Enabled:=true;
end;end;
procedure TSniffer.monitorendClick(Sender: TObject);
type
tipMonitorEnd = procedure(); stdcall;
var
fipmonitorend: tipmonitorend;
hDll: Thandle;
begin
hDll := LoadLibrary('SocketInit.dll');
if hDll = 0 then
Exit;
if monitorstart.enabled then exit;
fipMonitorend := TipMonitorend(GetProcAddress(hDll, 'MonitorEnd'));
if @fipMonitorend = nil then
begin
showmessage('error');
Exit;
end
else
begin
fipMonitorend();
monitorstart.Enabled:=true;
end;end;