🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14595

Re: IP adrress of a network computer

#14595
From: Vladimir Afanasyev
Date: Fri, 08 Aug 2003 13:40
22 lines
1628 bytes
Hi Jan,

"Jan Piessens" <> wrote:
>Hi all,
>
>I can find all the computers in a network with the function WNetEnumResource(), but is there a way to find also the IP adrress of a computer in a network ?
>
May be one of simplest solution it is using ping:

ping MyServer >> 1.txt

From 1.txt you can extract ip address of MyServer.
You can run ping via ShellExecute or CreateProcess.
As I remember wininet.dll also can possibility to do it.

If you network Administrator you can use WMI and via it 
obtain almost all information about computers in network.
Some ideas you can find here:
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=19443

Vladimir.
Technical Details
Message-ID: <3f33a840@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f336b2a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,68e5ffe7c328d7f6
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-08 06:46:30 PST
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: IP adrress of a network computer
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 212.82.216.226 212.82.216.226    
X-Forwarded-For: 192.168.0.147
References:  <3f336b2a$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f33a840@newsgroups.borland.com>
Date: 8 Aug 2003 06:40:16 -0700
X-Trace: newsgroups.borland.com 1060350016 207.105.83.65 (8 Aug 2003 06:40:16 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail