home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / array / vbarray.bas next >
BASIC Source File  |  1980-01-04  |  2KB  |  47 lines

  1. DefInt A-Z
  2.  
  3. '  OpenFile() Structure
  4. Type OFSTRUCT
  5.     cBytes As String * 1
  6.     fFixedDisk As String * 1
  7.     nErrCode As Integer
  8.     reserved As String * 4
  9.     szPathName As String * 128
  10. End Type
  11.  
  12. '  OpenFile() Flags
  13. Global Const OF_READ = &H0
  14. Global Const OF_WRITE = &H1
  15. Global Const OF_DELETE = &H200
  16. Global Const OF_CREATE = &H1000
  17. Global Const OF_EXIST = &H4000
  18.  
  19. Declare Function OpenFile Lib "Kernel" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Integer) As Integer
  20. Declare Function lclose Lib "Kernel" Alias "_lclose" (ByVal hFile As Integer) As Integer
  21. Declare Function llseek Lib "Kernel" Alias "_llseek" (ByVal hFile As Integer, ByVal lOffset As Long, ByVal iOrigin As Integer) As Long
  22.  
  23. ' ** lread declaration modification: lpBuffer As Any
  24. Declare Function lread Lib "Kernel" Alias "_lread" (ByVal hFile As Integer, lpBuffer As Any, ByVal wBytes As Integer) As Integer
  25.  
  26. ' ** lwrite declaration modification: lpBuffer As Any
  27. Declare Function lwrite Lib "Kernel" Alias "_lwrite" (ByVal hFile As Integer, lpBuffer As Any, ByVal wBytes As Integer) As Integer
  28.  
  29. ' API functions and constants used for the Demo only
  30. Declare Function GetTempFileName Lib "Kernel" (ByVal cDriveLetter As Integer, ByVal lpPrefixString As String, ByVal wUnique As Integer, ByVal lpTempFileName As String) As Integer
  31. Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
  32. Declare Function GetFocus Lib "User" () As Integer
  33.  
  34. Global Const WM_USER = &H400
  35. Global Const LB_RESETCONTENT = (WM_USER + 5)
  36. Global Const LB_SETTABSTOPS = (WM_USER + 19)
  37.  
  38. ' A structure of Sometype is used for the Demo
  39. Type SomeType
  40.     nInteger As Integer
  41.     sString As String * 6
  42.     lLong As Long
  43. End Type
  44.  
  45. ' Other constants
  46.  
  47.