Цитата:
Сообщение от 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;
|
Всё время пишет, что соединение существует, даже когда его нет.
__________________
Вот раньше, года этак в 60-е, было всё классно - sex, drugs & rock'n'roll. А сейчас? Suxx, bugs & plug'n'play...
|