|
|
|
Click here to copy the following block | Public Function GetProcessorType() As String Dim si As SYSTEM_INFO Dim os As OSVERSIONINFO
os.dwOSVersionInfoSize = Len(os) GetVersionEx os GetSystemInfo si Select Case si.wProcessorArchitecture Case PROCESSOR_ARCHITECTURE_INTEL Select Case os.dwPlatformId Case VER_PLATFORM_WIN32_NT Select Case si.wProcessorLevel Case 3 GetProcessorType = "Intel 80386" If (si.wProcessorRevision And &HFF00) = &HFF00 Then GetProcessorType = GetProcessorType And " Model " & ((si.wProcessorRevision And &HF0) / &HF) - 10 & " Stepping " & (si.wProcessorRevision And &HF) Else GetProcessorType = GetProcessorType And " Stepping " & Chr(Asc("A") + (si.wProcessorRevision And &HFF) / &HFF) & " Stepping " & (si.wProcessorRevision And &HFF) End If Case 4 GetProcessorType = "Intel 80486" If (si.wProcessorRevision And &HFF00) = &HFF00 Then GetProcessorType = GetProcessorType And " Model " & ((si.wProcessorRevision And &HF0) / &HF) - 10 & " Stepping " & (si.wProcessorRevision And &HF) Else GetProcessorType = GetProcessorType And " Stepping " & Chr(Asc("A") + (si.wProcessorRevision And &HFF) / &HFF) & " Stepping " & (si.wProcessorRevision And &HFF) End If Case 5 GetProcessorType = "Pentium Model " & (si.wProcessorRevision And &HFF00) \ &HFF & " Stepping " & (si.wProcessorRevision And &HFF) Case 6 GetProcessorType = "Pentium II Model " & (si.wProcessorRevision And &HFF00) \ &HFF & " Stepping " & (si.wProcessorRevision And &HFF) Case 7 GetProcessorType = "Pentium III Model " & (si.wProcessorRevision And &HFF00) \ &HFF & " Stepping " & (si.wProcessorRevision And &HFF) End Select Case VER_PLATFORM_WIN32_WINDOWS Select Case si.dwProcessorType Case PROCESSOR_INTEL_386 GetProcessorType = "Intel 80386" Case PROCESSOR_INTEL_486 GetProcessorType = "Intel 80486" Case PROCESSOR_INTEL_PENTIUM GetProcessorType = "Pentium" Case PROCESSOR_INTEL_PENTIUM2 GetProcessorType = "Pentium II" Case PROCESSOR_INTEL_PENTIUM3 GetProcessorType = "Pentium III" End Select End Select Case PROCESSOR_ARCHITECTURE_MIPS GetProcessorType = "MIPS R" & si.wProcessorLevel & "000" Case PROCESSOR_ARCHITECTURE_ALPHA GetProcessorType = "Alpha " & si.wProcessorLevel & " Model A" & (si.wProcessorRevision And &HFF00) \ &HFF & " Pass " & (si.wProcessorRevision And &HFF) Case PROCESSOR_ARCHITECTURE_PPC Select Case si.wProcessorLevel Case 1, 3, 4, 20 GetProcessorType = "PPC 6" & Format(si.wProcessorLevel, "00") Case 6 GetProcessorType = "PPC 603+" Case 9 GetProcessorType = "PPC 604+" End Select GetProcessorType = GetProcessorType & " Processor Version " & (si.wProcessorRevision And &HFF00) \ &HFF & "." & (si.wProcessorRevision And &HFF) End Select End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|