Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting computer name
Message
De
28/03/2007 14:34:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01209339
Message ID:
01209361
Vues:
30
Very good
Thank you

>Hello I use these routines
>
>function Computer_Name
>	local lcComputer, lnSize
>	lcComputer = space(80)
>	lnSize = 80
>	declare integer GetComputerName in WIN32API string @cComputerName, integer @nSize
>	= GetComputerName(@lcComputer, @lnSize)
>	if lnSize < 2
>		lcComputer = ""
>	else
>		lcComputer = substr(lcComputer, 1, lnSize)
>	endif
>	return lcComputer
>endfunc
>
>function Direccion_IP
>	IPSocket = createobject("MSWinsock.Winsock")
>	if type('IPSocket') = 'O'
>		return IPSocket.LocalIP
>	else
>		* messagebox("Winsock no está instalado!")
>		return ""
>	endif
>endfunc
>
>c.x.
>
>>Hi
>>I want to get the full computer name of the current computer (desktop\my computer\properties\computer name) and/or the current internal ip address.
>>Help please
Thank you
Chaim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform