Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug??? SYS(17)
Message
From
11/01/2005 06:52:49
 
 
To
11/01/2005 00:55:02
Felix Serra
Campus Management Corp.
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00975942
Message ID:
00975976
Views:
31
>Anyone ever noticed SYS(17) doesn't return the proper value if your CPU is an AMD?
>
>Doesn't work on my WinXP PRO SP2 on an AMD Athlon 1.4.

I know you were trying to point out a bug, but in case you actually wanted a reliable way to get that info you could try the following code that works on my AthlonXP 2600 under VFP9 Beta so I would assume it would work on yours:
LOCAL Locator AS WbemScripting.SWbemLocator

Locator = CreateObject("WbemScripting.SWbemLocator")
Server = Locator.ConnectServer()
CLEAR
colItems  =  Server .ExecQuery( "Select  *  from  Win32_Processor")
cText = ""
For each procAttrib in colItems  
	cText = cText + TRANSFORM(procAttrib.Name) + CHR(10)
	cText = cText + TRANSFORM(procAttrib.Manufacturer) + CHR(10)
	cText = cText + TRANSFORM(procAttrib.Description) + CHR(10)
    cText = cText + TRANSFORM(procAttrib.CurrentClockSpeed) + "/" + TRANSFORM(procAttrib.MaxClockSpeed) + CHR(10)
NEXT

? cText
I assume that SYS(17) must be using an older system call and the AMD procs are answering it in some sort of compatibility mode? Either way sometimes it pays to look at new ways of doing things as the the WMI stuff can get you loads more info than SYS(17) ever could.

And of course I don't know if WMI is included in Windows prior to Windows 2000 so if you need to support Windows 98 you might be out of luck :)

Chris.
Have a nice day :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform