Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting computer name
Message
 
À
28/03/2007 14:13:53
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:
01209354
Vues:
28
This message has been marked as the solution to the initial question of the thread.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform