Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I retrieve CPU vendor info?
Message
 
To
15/12/2005 11:07:29
Somesh Sahu
Cybage Software Pvt Ltd,
Pune, India
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00985386
Message ID:
01078347
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform