Реферат: Конфигурация аппаратных средств персонального компьютера
vSerialNum(i) = 255
lRet = GetVolumeInformation(Drives(i), VNBuffer(i), VNSize(i), vSerialNum(i), vCompLen(i), vFlags(i), vSysBuff(i), vSysSize(i))
If lRet = 1 Then VNBuffer(i) = Left$(VNBuffer(i), Len(RTrim$(VNBuffer(i))) - 1): vSysBuff(i) = Left$(vSysBuff(i), Len(RTrim$(vSysBuff(i))) - 1): vSerialNum(i) = Left$(vSerialNum(i), Len(RTrim$(vSerialNum(i))) - 1)
If lRet = False Then VNBuffer(i) = "None": vSysBuff(i) = "None"
Next
End Sub
Код класса clsMemorySnapshot(Memory.cls)
Option Explicit
Private Type MEMORYSTATUS
dwLength As Long
dwMemoryLoad As Long
dwTotalPhys As Long
dwAvailPhys As Long
dwTotalPageFile As Long
dwAvailPageFile As Long
dwTotalVirtual As Double
dwAvailVirtual As Double
End Type
Private Declare Sub GlobalMemoryStatus Lib "kernel32" _
(lpBuffer As MEMORYSTATUS)
Private mmemMemoryStatus As MEMORYSTATUS
Public Property Get FreeMemory() As Long
FreeMemory = mmemMemoryStatus.dwAvailPhys
End Property
Public Property Get TotalMemory() As Long
TotalMemory = mmemMemoryStatus.dwTotalPhys
End Property
Public Property Get TotalVirtualMemory() As Double
TotalVirtualMemory = mmemMemoryStatus.dwTotalVirtual