|
-
Aug 10th, 2000, 10:04 AM
#1
Thread Starter
New Member
Does anyone know how to determine the number of CPU's in a machine>
Visual Basic 5 SP3 and JavaScript
-
Aug 10th, 2000, 12:04 PM
#2
New Member
check out
http://www.vbsquare.com/tips/tip443.html
It will answer all your questions
-
Aug 11th, 2000, 04:11 AM
#3
Addicted Member
'Copy code into Module
Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)
Type SYSTEM_INFO
dwOemID As Long
dwPageSize As Long
lpMinimumApplicationAddress As Long
lpMaximumApplicationAddress As Long
dwActiveProcessorMask As Long
dwNumberOrfProcessors As Long
dwProcessorType As Long
dwAllocationGranularity As Long
dwReserved As Long
End Type
Public Const PROCESSOR_INTEL_386 = 386
Public Const PROCESSOR_INTEL_486 = 486
Public Const PROCESSOR_INTEL_PENTIUM = 586
Public Const PROCESSOR_MIPS_R4000 = 4000
Public Const PROCESSOR_ALPHA_21064 = 21064
Public Function GetProcessor()
Dim V As SYSTEM_INFO, Info$
Dim NoOfProcessors$, ProcessorType$, PageSize$
GetSystemInfo V
NoOfProcessors = V.dwNumberOrfProcessors
ProcessorType = V.dwProcessorType
Select Case ProcessorType
Case PROCESSOR_INTEL_386
Info = Info & "Intel 386" & vbCrLf
Case PROCESSOR_INTEL_486
Info = Info & "Intel 486" & vbCrLf
Case PROCESSOR_INTEL_PENTIUM
Info = Info & "Intel Pentium" & vbCrLf
Case PROCESSOR_MIPS_R4000
Info = Info & "MIPS R4000" & vbCrLf
Case PROCESSOR_ALPHA_21064
Info = Info & "DEC Alpha 21064" & vbCrLf
Case Else
Info = Info & "(unknown)" & vbCrLf
End Select
GetProcessor = "No of Processors: " & NoOfProcessors & vbCrLf & "Processor Type: " & Info
End Function
'Call Function
'eg.
'MsgBox GetProcessor
-
Aug 11th, 2000, 10:22 AM
#4
Thread Starter
New Member
Thanks I will give these a try
Visual Basic 5 SP3 and JavaScript
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|