我用了在
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_21729634.html
介绍的方法:
{
You're going to have to do things like :-
HookCode('WS2_32.DLL', 'WSAConnect', @WSAConnectCallBack, @WSAConnectOld);
HookCode('wsock32.dll', 'connect', @ConnectCallBack, @ConnectOld);
and handle each and every function to be able to look at the data.
The call backs are like :-
function connectCallBack(s: TSocket; var name: sockaddr_in; namelen: Integer): Integer; stdcall;
begin
.................
Result := connectOld(s, name, namelen);
end;
function WSAConnectCallBack( const s : TSocket; const name : PSockAddr; const namelen : Integer; lpCallerData,lpCalleeData : LPWSABUF; lpSQOS,lpGQOS : LPQOS ) : Integer; stdcall;
begin
.....
Result := WSAConnectOld(s, PSockAddr, namelen, lpCallerData, lpCalleeData, lpSQOS, lpGQOS);
end;
and so on.
}
可以阻止上网,不过它阻止了所有程序,我怎样才能阻止指定某一个程序呢?
谁有好办法吗?