Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Current TCP/IP Address to VFP
Message
De
21/03/1999 15:27:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00199522
Message ID:
00200320
Vues:
11
>>>>Does anybody know of a way to recieve the Current Workstations TCP/IP address in to Vfp as a String. I have been trying to mess with ws2_32.dll but am having no luck. I have also spent 4 hours pouring over the Developers network CD. Any help would be appreciated.
>>>
>>>Bob,
>>>
>>>Just to clarify what Ed said, if you issue CREATEOBJECT("MSWinsock.Winsock.1"), the object returned has a property named LocalIP, which will contain the local IP Address as a string.
>>
>>What happens if the computer has more than one IP address?
>
>Hi Albert,
>
>I'm guessing here, but I'd assume that it would return either the first one defined or the one currently referenced as the default (if there is such a thing). I don't have access to a machine with multiple IPs.

We have some. From experience with Java RMI Servers, I suspect that the IP address assigned to the first installed NIC will be returned. I see the assumption that there will be on IP address as a design flaw. There should be some way to get an enumerated list of assigned IP addresses.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform