JC,
>
Actually, I want to see if an IP location of my local network is available ... if the machine is turned on, for example.
>
You can look for that machine mac address (network card identifier).
Antonio Linares wrote:You can look for that machine mac address (network card identifier).
Antonio Linares wrote:http://forums.fivetechsoft.com/viewtopic.php?t=12596
Antonio Linares wrote:What value do you get for a connected computer ?
The way I commented you is for software protection, to check the server network card id.
cIp:="192.168.0.164"
if empty( getHostByAddress( cIp ) )
MsgInfo("IP does not Exists")
else
MsgInfo("IP Exists")
Endif
cIpAddress := "192.168.0.254"
cNetbiosName := "home_pc"
msgInfo( getHostByAddress( cIpAddress ) ) -> returns "home_pc"
msgInfo( getHostByName( nNetbiosName ) ) -> returns "192.168.0.254"
if empty( getHostByAddress( "192.168.0.162" ) ) // Returning empty
MsgInfo("IP does not Exists")
else
MsgInfo("IP Exists")
Endif
if empty( getHostByName("PC1")) // Returning 0.0.0.0
MsgInfo("Name PC1 does not exist")
else
MsgInfo("Name PC1 Exists")
Endif
C:\>ping PC1
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 33 guests