Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Obtaining IP address of current PC
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00514497
Message ID:
00514549
Vues:
12
The following works for me from the command window. Would probably work under runtime?
oForm = newobject('form')
oForm.AddObject('MSWinsock.Winsock.1', 'oleControl')
oForm.AddObject('oleWinsock','oleControl', 'MSWinsock.Winsock.1')
lcIP = oForm.oleWinsock.LocalIP
lcHost = oForm.oleWinsock.LocalHostName
>You could also subclass the OLEControl. The same license information is embedded in the VCX. However, because the object is an OLEControl, there is a workaround for using the subclass in code. You have to add it to a form at run-time. The following might work:
>oform = createobject('form')
>oform.Newobject('owinsock','mywinsockclass','mywinsockclasslibrary')
>? oform.owinsock.LocalIP
>oform.release
>release oform
>
>HTH.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform