home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / vbpg32 / samples4 / ch01 / ch01.bas next >
Encoding:
BASIC Source File  |  1995-05-04  |  1.3 KB  |  41 lines

  1. Attribute VB_Name = "CH1Module"
  2. Option Explicit
  3.  
  4. Type FILETIME
  5.     dwLowDateTime As Long
  6.     dwHighDateTime As Long
  7. End Type
  8.  
  9.  
  10. Type MEMORYSTATUS
  11.     dwLength As Long    ' 32
  12.     dwMemoryLoad As Long    ' percent of memory in use
  13.     dwTotalPhys As Long ' bytes of physical memory
  14.     dwAvailPhys As Long ' free physical memory bytes
  15.     dwTotalPageFile As Long ' bytes of paging file
  16.     dwAvailPageFile As Long ' free bytes of paging file
  17.     dwTotalVirtual As Long  ' user bytes of address space
  18.     dwAvailVirtual As Long  ' free user bytes
  19. End Type
  20.  
  21. Type SYSTEMTIME
  22.     wYear As Long
  23.     wMonth As Long
  24.     wDayOfWeek As Long
  25.     wDay As Long
  26.     wHour As Long
  27.     wMinute As Long
  28.     wSecond As Long
  29.     wMilliseconds As Long
  30. End Type
  31.  
  32.  
  33. Declare Sub GetSystemTime Lib "KERNEL32" (lpSystemTime As SYSTEMTIME)
  34. Declare Sub GlobalMemoryStatus Lib "KERNEL32" (lpmstMemStat As MEMORYSTATUS)
  35. Declare Function GetFocus& Lib "user32" ()
  36. Declare Function SendMessage& Lib "user32" Alias "SendMessageA" (ByVal hWnd&, ByVal message&, ByVal wParam&, lParam As Any)
  37. Declare Function SendMessageByString& Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String)
  38. Declare Function SystemTimeToFileTime Lib "KERNEL32" (lpSystemTime As SYSTEMTIME, lpFileTime As FILETIME) As Long
  39.  
  40.  
  41.