devxlogo

March 3, 2003

GetComputerModel – Retrieving the computer model

‘ Returns the computer model’ Requires a reference to System.Management and the respective ImportsFunction GetComputerModel() As String Dim mos As New ManagementObjectSearcher _ (“SELECT * FROM Win32_ComputerSystem”) Dim mo As

GetDomainName – Retrieving the domain name

‘ Returns the domain name’ Requires a reference to System.Management and the respective ImportsFunction GetDomainName() As String Dim mos As New ManagementObjectSearcher _ (“SELECT * FROM Win32_ComputerSystem”) Dim mo As

GetDomainRole – Retrieving the domain role

Enum DomainRole As Integer StandaloneWorkstation = 0 MemberWorkstation = 1 StandaloneServer = 2 MemberServer = 3 BackupDomainController = 4 PrimaryDomainController = 5End Enum’ Returns the domain role’ Requires a reference

GetPhysicalMemory – Retrieving the physical memory amount

‘ Returns the physical memory amount, in bytes’ Requires a reference to System.Management and the respective ImportsFunction GetPhysicalMemory() As Long Dim mos As New ManagementObjectSearcher _ (“SELECT * FROM Win32_ComputerSystem”)

GetSystemType – Retrieving the computer type

‘ Returns the system type, for example “X86-based PC” or “Power PC”‘ Requires a reference to System.Management and the respective ImportsFunction GetSystemType() As String Dim mos As New ManagementObjectSearcher _