home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / w3_prog / vbdb3b.arj / VBDEM.ZIP / GLOBAL.BAS < prev    next >
Encoding:
BASIC Source File  |  1991-09-08  |  2.3 KB  |  64 lines

  1. ' DBase III DLL interface
  2. ' Copyright code and source (c) 1991 Nigel salt
  3. ' WARNING
  4. ' ************************************************
  5. ' Your application will hang Windows if
  6. '   db3dll.dll and vbaddr.dll
  7. ' are not in your windows path
  8. ' ************************************************
  9.  
  10. ' CONST
  11. Global Const MAX_HEADER = 4129
  12. Global Const MAX_BYTES_IN_RECORD = 4000
  13. Global Const MAX_FIELDS_IN_RECORD = 128
  14. Global Const BYTES_IN_MEMO = 512
  15.  
  16. ' Error returns from DB3DLL functions
  17. Global Const NotDB = &H80
  18. Global Const InvalidField = &H81
  19. Global Const RecTooHigh = &H82
  20. Global Const PartialRead = &H83
  21. Global Const NoInfo = &H84
  22.  
  23.  
  24.  
  25. ' vbaddr.dll assembler functions
  26. Declare Function getaddr Lib "vbaddr.dll" (ByVal varaddr As Any) As Long
  27. Declare Function peekbyt Lib "vbaddr.dll" (ByVal varaddr As Any) As Integer
  28. Declare Sub pokebyt Lib "vbaddr.dll" (ByVal varaddr As Any, ByVal bytval As Integer)
  29. Declare Function peekbytoff Lib "vbaddr.dll" (ByVal varaddr As Any, ByVal varoff As Integer) As Integer
  30. Declare Sub pokebytoff Lib "vbaddr.dll" (ByVal varaddr As Any, ByVal varoff As Integer, ByVal bytval As Integer)
  31. Declare Sub MoveBytes Lib "vbaddr.dll" (ByVal saddr As Any, ByVal daddr As Any, ByVal length As Integer)
  32.  
  33. ' db3dll.dll PASCAL functions
  34. Declare Sub GetDBfRecord Lib "db3dll.dll" (ByVal dbrec As Any, ByVal recnum As Long, dbfError As Integer)
  35. Declare Sub PutDbfRecord Lib "db3dll.dll" (ByVal dbrec As Any, ByVal recnum As Long, dbfError As Integer)
  36. Declare Sub AppendDbf Lib "db3dll.dll" (ByVal dbrec As Any, dbfError As Integer)
  37. Declare Sub CloseDbf Lib "db3dll.dll" (ByVal dbrec As Any, dbfError As Integer)
  38. Declare Sub OpenDbf Lib "db3dll.dll" (ByVal dbrec As Any, dbfError As Integer)
  39. Declare Sub CreateDbf Lib "db3dll.dll" (ByVal dbrec As Any, ByVal nameptr As String, ByVal NumFields As Integer, ByVal fieldptr As Any, dbfError As Integer)
  40.  
  41. ' Global VARIABLES
  42. ' ================
  43. Global Lresult As Long
  44. Global Iresult As Integer
  45. ' DBase file buffer
  46. Global db3file As String * 255
  47. ' Data buffer
  48. Global databuff As String * 255
  49.  
  50. ' These variables are filled in by GetDBInfo
  51. ' which is declared in (general)
  52. Global DateOfUpdate As String
  53. Global NumRecs As Long
  54. Global RecLen As Integer
  55. Global NumFields
  56. ' DLL's pointer to a record buffer
  57. Global RecPointer As Long
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.