Цитата:
|
Сообщение от Vayrus
Попробуй:
Код:
procedure TForm1.Button1Click(Sender: TObject);
begin
if GetSystemMetrics(SM_NETWORK) and $01 = $01 then
ShowMessage('Computer is attached to a network!')
else
ShowMessage('Computer is not attached to a network!');
end;
//Для кучи, определение RDP
//returns true if running under Windows Terminal Services
function TRemoteSession.IsRemoteSession: boolean;
(*
const
sm_RemoteSession = $1000;
*)
begin
result := GetSystemMetrics(sm_RemoteSession) <> 0;
end;
|
Всё время пишет, что соединение существует, даже когда его нет.
|