Autor Beitrag
O'rallY
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: Di 17.06.03 16:29 
Habe einfach mal aus Lust ein kleine IP-Guck-Programm geschrieben. Ja, gibts wie Sand am Meer, aber egal.
Ein Ziel war, dass das Programm möglichst klein wird. Ungepackt ist es nun 23 KB groß, was mich auch ein wenig stolz macht *bescheidenguck*(ist mein erstes NonVCL Programm :mrgreen:).
Ok, Spaß beiseite: Das Programm liest von checkip.dyndns.org die aktuelle Inet-IP aus. Funktioniert also auch mit einem Router. Außerdem liest es vom ausführenden Rechener die lokale IP aus.
Das Programm nistet sich im TNA ein. Tooltip und Popupmenü zeigt IPs an. Durch klick auf eine IP (im Popupmenü) wird sie in die Zwischenablage kopiert.
Programm checkt standardmäßig, aber optinal, alle 5 min die IPs.

www.mokasin.de/projects/GetIP/GetIP.zip (13 KB)

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 17.06.03 18:41 
sehr gut.

das logo im tna ist nett

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Fr 20.06.03 12:49 
Erinnter mich am mein sHoW_IP :lol:
O'rallY Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: Fr 20.06.03 15:26 
Korrekt! :wink:
Ich hoffe du nimmst mir das nicht übel.
Übrigens geht der Download-Link von SHoW_IP nicht mehr...

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Fr 20.06.03 16:01 
Warum sollte ich es dir übel nehmen?
GruppeCN
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 322



BeitragVerfasst: Di 15.07.03 17:24 
Wie kriegt ihr die Datei vom Server?

_________________
Warum sind die Sachen, die du suchst, immer da, wo du zuletzt nachsiehst?
Weil du aufhörst zu suchen, wenn du sie gefunden hast.
Leathl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Di 15.07.03 18:07 
---


Zuletzt bearbeitet von Leathl am Sa 15.08.09 16:29, insgesamt 1-mal bearbeitet
O'rallY Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: Mi 16.07.03 16:19 
@Leathl Dann kann mein Programm aus irgendeinem Grund nicht ins Internet oder die Seite checkip.dyndns.org/ ist nicht erreichbar, da es von dieser die Daten bezieht.

@GruppeCN Alles über API. Hier meine Funktion:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
function LoadURL(URL: String): String;
var
  IOpen, IURL: HINTERNET;
  Read: Cardinal;
  Msg: array[0..4096of Char;
begin
  Result := '';
  try
    IOpen := InternetOpen('GetIP', INTERNET_OPEN_TYPE_PRECONFIG, '''',
        INTERNET_FLAG_NEED_FILE);
    if IOpen <> nil then
    try
      IURL := InternetOpenUrl(IOpen, PAnsiChar(URL), nil0,
          INTERNET_FLAG_NO_UI or INTERNET_FLAG_PRAGMA_NOCACHE or INTERNET_FLAG_RELOAD, 0);
      if IURL <> nil then
      try
        repeat
          FillChar(Msg, SizeOf(Msg), 0);
          if InternetReadFile(IURL, @Msg[0], Pred(SizeOf(Msg)), Read) then
            Result := Result + Msg
          else
            Break;
        until Read = 0
      finally
        InternetCloseHandle(IURL);
      end
    finally
      InternetCloseHandle(IOpen);
    end;
  except
  end;
end;

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
GruppeCN
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 322



BeitragVerfasst: Mi 16.07.03 16:56 
Und was zurück gegeben wird, ist der Quellcode?

_________________
Warum sind die Sachen, die du suchst, immer da, wo du zuletzt nachsiehst?
Weil du aufhörst zu suchen, wenn du sie gefunden hast.
O'rallY Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: Do 17.07.03 15:01 
Ja, der vollständige Quellcode. Kannst es ja auch einfach mal ausprobieren :?.

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
GruppeCN
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 322



BeitragVerfasst: Do 17.07.03 20:22 
Okay, danke für deinen Code.

_________________
Warum sind die Sachen, die du suchst, immer da, wo du zuletzt nachsiehst?
Weil du aufhörst zu suchen, wenn du sie gefunden hast.