Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I retrieve CPU vendor info?
Message
 
À
15/12/2005 11:07:29
Somesh Sahu
Cybage Software Pvt Ltd,
Pune, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00985386
Message ID:
01078347
Vues:
21
>Hi,
> I found ur code to get the HD info very helpful.
> Can u give some idea or API name to get the serial number of the ethernet card installed on a CPU. I am working on vfp 7.
> Thanks in advance,

Hi Somesh,

I do not know how to get the SN of the ethernet card, I do not see any property for it (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_networkadapter.asp or http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_networkadapterconfiguration.asp) if you want the MAC Address, you can try something like this:
local loWMI, loLocator, loNAs, loNA

clear
try
	loLocator		= createObject("wbemScripting.SwbemLocator")
	loWMI			= loLocator.ConnectServer()
catch
	loWMI			= null
endtry

if not Isnull(loWMI)
	loNAs				= loWMI.ExecQuery('Select * from Win32_NetworkAdapterConfiguration where IPEnabled=true and DNSDomain="' + Getenv("USERDNSDOMAIN") + '"')
	for each loNA in loNAs
		with loNA
			? .Description, .MACAddress, .DNSHostName, .DNSDomain
		endwith
	endfor
endif
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform