Autor Beitrag
NetZwerg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: Mi 24.03.04 19:25 
Hallo,

ich möchte mein Programm dazu bringen, zu überprüfen ob der user online ist!? Ich glaube chat-programme wie icq machen das, indem sie irgendeinen port überprufen oder so?

cYa, Dave :twisted:

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mi 24.03.04 19:29 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
uses StdCtrls, registry;

Function IsConnected : Boolean;
var reg  : TRegistry;
    buff : dword;
begin
        reg         := tregistry.Create ;
     Reg.RootKey := HKey_local_machine;
     if reg.OpenKey('\System\CurrentControlSet\Services\RemoteAccess',false) then
     begin
          reg.ReadBinaryData('Remote Connection',buff,sizeof(buff));
          result := buff = 1;
          reg.CloseKey ;
          reg.Free ;
     end;
end;

(Quelle: home.arcor.de/hardcoders/)

Überprüft ob der Rechner Online ist.


Zuletzt bearbeitet von GTA-Place am Mi 24.03.04 20:08, insgesamt 1-mal bearbeitet
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 24.03.04 20:04 
Wenn Du Beiträge aus dem SwissDelphiCenter postest, gehört es zum guten Ton, dass Du dazu schreibst, dass das nicht auf Deinem Mist gewachsen ist. :roll:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mi 24.03.04 20:06 
Ist nicht von swiss....
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 24.03.04 20:08 
So sieht der Quelltext bei SwissDelphiCenter aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
uses
  StdCtrls, registry;

function IsConnected: Boolean;
var
  reg: TRegistry;
  buff: DWORD;
begin
  reg := TRegistry.Create;
  Reg.RootKey := HKey_local_machine;
  if reg.OpenKey('\System\CurrentControlSet\Services\RemoteAccess', False) then
  begin
    reg.ReadBinaryData('Remote Connection', buff, SizeOf(buff));
    Result := buff = 1;
    reg.CloseKey;
    reg.Free;
  end;
end;


Dein Quelltext ist mit diesem Identisch.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mi 24.03.04 20:11 
Trotzdem nicht von SwissDelphiCenter
Siehe mein Beitrag: Edit
NetZwerg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 448

Slackware 10.1
Kylix 3, D5 Standard
BeitragVerfasst: Mi 24.03.04 20:28 
aso, aber wozu is das gut?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
begin 
  reg := TRegistry.Create; 
  Reg.RootKey := HKey_local_machine; 
  if reg.OpenKey('\System\CurrentControlSet\Services\RemoteAccess', False) then 
  begin 
 //>>>>>>>
   reg.ReadBinaryData('Remote Connection', buff, SizeOf(buff)); 
    Result := buff = 1; 
    reg.CloseKey; 
    reg.Free;
//<<<<<<<<<
  end;


cYa, Dave :twisted:

Moderiert von user profile iconPeter Lustig: Delphi-Tags hinzugefügt

_________________
"Manche Leute drücken nur deshalb ein Auge zu, damit sie besser zielen können."
Billy Wilder, amer. Filmregisseur