Class: ComputerInfo in Category Windows : System Information from Total Visual SourceBook

Obtain computer CPU system information and processor features with support for 32 and 64-bit API calls using VBA and VB6.

Procedure Name Type Description
(Declarations) Declarations Declarations and private variables for the CComputerInfo class.
ActiveProcessorMask Property The mask value representing the processors in the system. The bit or bits set in the mask indicate the active processor (bit 0 is processor 0; bit 31 is processor 31). This value is 1 for most computers. A double data type is used to support 64-bit values that may exceed long.
AllocationGranularity Property Get the granularity with which virtual memory is allocated. Virtual memory is always allocated in increments of the amount returned by this property. For example, allocating one byte of memory with VirtualAlloc will reserve an address space equal to the amount returned by this property.
LowMemory Property Determine whether the computer is a low memory machine.
MaxAppAddress Property Retrieve the highest memory address accessible to applications and DLLs. The return value is a data type double rather than long to support 64-bit environments which may have values that exceed long.
MinAppAddress Property Retrieve the lowest memory address accessible to applications and DLLs. The return value is a data type double rather than long to support 64-bit environments which may have values that exceed long.
NumberOfProcessors Property Get the number of processors in the system.
PageSize Property Get the memory page size.
ProcessorArchitecture Property Get the processor architecture value from the enmProcessorArchitecture enumerated type.
ProcessorArchitectureName Property Get the processor architecture name.
ProcessorLevel Property Get the system's architecture-dependent processor level.
ProcessorRevision Property Get the architecture-dependent processor revision.
ProcessorType Property Get the processor type ID value.
ProcessorTypeName Property Get the name of the processor type.
SlowGraphics Property Are the graphics slow?
SlowMachine Property Is the computer is slow?
CompareExchangeDouble Property Determine whether the compare and exchange double operation is available.
FloatingPointEmulated Property Determine whether the floating point emulation is used.
FloatingPointError Property Determine whether the Pentium floating point bug exists in this processor.
MMXAvailable Property Does the processor supports MMX? MMX is a standard introduced by Intel. Sometimes called Matrix Math Extensions.
SSEAvailable Property Is the Streaming SIMD Extensions (SSE) instruction set is available? SSE is an instruction set extension to the x86 architecture.
SSE2Available Property Is the Streaming SIMD Extensions 2 (SSE2) instruction set is available? SSE2 is an instruction set introduced with the Pentium 4 in 2001.
SSE3Available Property Is the Streaming SIMD Extensions 3 (SSE3) instruction set is available? SSE3 is an instruction set introduced with the IA-32 (x86) architecture in 2004.
ThreeDNowAvailable Property Is the 3D-Now instruction set available?
TimeStampCounterAvailable Property Is the RDTSC Time Stamp Counter instruction available?
PhysicalAddressExtensionEnabled Property Is Physical Address Extension (PAE) enabled on the processor? PAE enables x86 processors to access more than 4 GB of RAM. Certain 32-bit versions of Windows Server running on x86-based systems use PAE to access up to 128GB of RAM, depending on the address size of the processor.
DataExecutionPreventionEnabled Property Is Data Execution Prevention (DEP) enabled? Data Execution Prevention (DEP) is a system-level memory protection feature starting with Windows XP and Windows Server 2003. DEP enables the system to mark memory as non-executable so that code cannot be run from that region of memory, which minimizes the exploitation of buffer overruns.
CompareExchange128Available Property Is the atomic compare and exchange 128-bit operation (cmpxchg16b) available? This is not available in Windows Server 2003 and Windows XP/2000.
Compare64Exchange128Available Property Is the atomic compare 64 and exchange 128-bit operation (cmp8xchg16) available? This is not available in Windows Server 2003 and Windows XP/2000.
ProcessorChannelsEnabled Property Are the processor channels enabled?
XSaveEnabled Property Does the processor implement the XSAVE and XRSTOR instructions? This feature is not supported until Windows 7 and Windows Server 2008 R2.
ARM_RegistersAvailable Property Is the VFP/Neon 32 x 64bit extended register bank present?
SecondLevelAddressTranslation Property Is the Second Level Address Translation supported by the hardware?
VirtualizationEnabled Property Is Virtualization enabled in the firmware?
RDFSBASE_Enabled Property Are RDFSBASE, RDGSBASE, WRFSBASE, and WRGSBASE instructions available?
FastFailAvailable Property Is FastFail available?
ARM_DivideInstructionsAvailable Property Are divide instructions available?
ARM64LoadStoreAvailable Property Are 64-bit load/store atomic instructions available?
ARM_ExternalCacheAvailable Property Is ARM external cache available?
ARM_FloatingPointAvailable Property Is ARM floating-point multiply-accumulate instruction available?
Class_Initialize Initialize Initialize the system info type so that it only needs to be called once in this class.
' Example of CComputerInfo
' To use this example, create a new module and paste this code into it.
' Then run the procedure by putting the cursor in the procedure and pressing:
'    F5 to run it, or
'    F8 to step through it line-by-line (see the Debug menu for more options)

Private Sub Example_CComputerInfo()
  ' Comments: Example of using the CComputerInfo class to get CPU system information and processor features, in VB6 and VBA with 32 and 64 bit Windows API calls.
  '           Run this procedure and see the information in the Immediate Window.

  Dim clsComputerInfo As CComputerInfo

  Set clsComputerInfo = New CComputerInfo

  ' Show the value of each property
  Debug.Print "Active Processor Mask   = " & clsComputerInfo.ActiveProcessorMask
  Debug.Print "Allocation Granularity  = " & clsComputerInfo.AllocationGranularity

  Debug.Print "Low Memory      = " & clsComputerInfo.LowMemory
  Debug.Print "Max App Address = " & FormatNumber(clsComputerInfo.MaxAppAddress, 0, , , vbTrue)
  Debug.Print "Min App Address = " & FormatNumber(clsComputerInfo.MinAppAddress, 0, , , vbTrue)
  Debug.Print "Processors      = " & clsComputerInfo.NumberOfProcessors
  Debug.Print "Page Size       = " & clsComputerInfo.PageSize

  Debug.Print "Slow Graphics   = " & clsComputerInfo.SlowGraphics
  Debug.Print "Slow Machine    = " & clsComputerInfo.SlowMachine

  Debug.Print "Processor Information:"
  Debug.Print "Architecture      = " & clsComputerInfo.ProcessorArchitecture
  Debug.Print "Architecture Name = " & clsComputerInfo.ProcessorArchitectureName

  Debug.Print "Level             = " & clsComputerInfo.ProcessorLevel
  Debug.Print "Revision          = " & clsComputerInfo.ProcessorRevision

  Debug.Print "Type              = " & clsComputerInfo.ProcessorType
  Debug.Print "Type Name         = " & clsComputerInfo.ProcessorTypeName

  Debug.Print "Processor Features:"
  Debug.Print "Floating Point Emulated    = " & clsComputerInfo.FloatingPointEmulated
  Debug.Print "Floating Point Error       = " & clsComputerInfo.FloatingPointError
  Debug.Print "Compare Exchange Double    = " & clsComputerInfo.CompareExchangeDouble
  Debug.Print "MMX                        = " & clsComputerInfo.MMXAvailable
  Debug.Print "SSE                        = " & clsComputerInfo.SSEAvailable
  Debug.Print "SSE2                       = " & clsComputerInfo.SSE2Available
  Debug.Print "SSE3                       = " & clsComputerInfo.SSE3Available
  Debug.Print "3-D Now                    = " & clsComputerInfo.ThreeDNowAvailable
  Debug.Print "TimeStamp Counter          = " & clsComputerInfo.TimeStampCounterAvailable
  Debug.Print "Physical Address Extension = " & clsComputerInfo.PhysicalAddressExtensionEnabled
  Debug.Print "Data Execution Prevention  = " & clsComputerInfo.DataExecutionPreventionEnabled
  Debug.Print "Compare & Exchange 128-bit = " & clsComputerInfo.CompareExchange128Available
  Debug.Print "Compare64 Exchange 128-bit = " & clsComputerInfo.Compare64Exchange128Available
  Debug.Print "Processor Channels Enabled = " & clsComputerInfo.ProcessorChannelsEnabled
  Debug.Print "XSAVE and XRSTOR Enabled   = " & clsComputerInfo.XSaveEnabled
  Debug.Print "Second Level Address Trans.= " & clsComputerInfo.SecondLevelAddressTranslation
  Debug.Print "Virtualization Enabled     = " & clsComputerInfo.VirtualizationEnabled
  Debug.Print "RDFSBASE, RDGSBASE Enabled = " & clsComputerInfo.RDFSBASE_Enabled
  Debug.Print "Is FastFail available?     = " & clsComputerInfo.FastFailAvailable

  Debug.Print "ARM Extended Registers     = " & clsComputerInfo.ARM_RegistersAvailable
  Debug.Print "ARM Divide Instructions    = " & clsComputerInfo.ARM_DivideInstructionsAvailable
  Debug.Print "ARM 64-bit Load and Store  = " & clsComputerInfo.ARM64LoadStoreAvailable
  Debug.Print "ARM External Cache         = " & clsComputerInfo.ARM_ExternalCacheAvailable
  Debug.Print "ARM Floating Point         = " & clsComputerInfo.ARM_FloatingPointAvailable

  Set clsComputerInfo = Nothing
End Sub

Total Visual SourceBook The source code in Total Visual Sourcebook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Total Visual SourceBook is written for the needs of a developer using a source code library covering the many challenges you face. Countless developers over the years have told us they learned some or much of their development skills and tricks from our code. You can too!

Additional Resources

Total Visual SourceBook CD and Printed Manual

Microsoft Access/ Office 2016, 2013, 2010, and 2007 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office and VB6

Supports Access/Office 2016, 2013, 2010 and 2007, and Visual Basic 6.0!

View all FMS products for Microsoft Access All Our Microsoft Access Products


Reader Choice Award for MS Access Source Code Library
Reader Choice

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

SourceBook Info

Additional Info




Free Product Catalog from FMS