home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / ni_vb / nwfile.bas < prev    next >
BASIC Source File  |  1993-06-03  |  4KB  |  94 lines

  1. 'NWFILE.BAS  NetWare File Services Interface for Visual Basic For Windows
  2. 'Version 1.0
  3. 'Novell Systems Research Department, Novell, Inc.
  4. 'Copyright (c) 1993, Novell, Inc.
  5. 'This interface is not supported through Novell's regular
  6. 'support channels.  See README.TXT for more information.
  7.  
  8. 'File attributes
  9. Global Const FA_NORMAL = &H0
  10. Global Const FA_READ_ONLY = &H1
  11. Global Const FA_HIDDEN = &H2
  12. Global Const FA_SYSTEM = &H4
  13. Global Const FA_EXECUTE_ONLY = &H8
  14. Global Const FA_DIRECTORY = &H10
  15. Global Const FA_ARCHIVE = &H20
  16. Global Const FA_SHARABLE = &H80
  17.  
  18. 'Extended file attributes
  19. Global Const FA_TRANSACTIONAL = &H10
  20. Global Const FA_INDEXED = &H20
  21. Global Const FA_READ_AUDIT = &H40
  22. Global Const FA_WRITE_AUDIT = &H80
  23.  
  24. 'Type NWFILE_ENTRY declared in Directory Services section
  25.  
  26. Type FORK_SIZE
  27.     logical As Long
  28.     physical As Long
  29. End Type
  30.  
  31. Type NWPHYS_ENTRY
  32.     sequence As Long
  33.     reserved1 As Long
  34.     attributes As Long
  35.     reserved2 As Integer
  36.     NSType As String * 1
  37.     nameLength As String * 1
  38.     name As String * 12
  39.     creationDate As Integer
  40.     creationTime As Integer
  41.     ownerID As Long
  42.     lastArchivedDate As Integer
  43.     lastArchivedTime As Integer
  44.     lastArchiverID As Long
  45.     modifyDate As Integer
  46.     modifyTime As Integer
  47.     lastModifierID As Long
  48.     dataForkSize As Long
  49.     reserved3 As String * 44
  50.     inheritedRightsMask As Integer
  51.     lastAccessDate As Integer
  52.     reserved4 As String * 28
  53.     forkSize1 As FORK_SIZE
  54.     forkSize2 As FORK_SIZE
  55.     forkSize3 As FORK_SIZE
  56.     forkSize4 As FORK_SIZE
  57.     forkSize5 As FORK_SIZE
  58. End Type
  59.  
  60. Type NWSALV_ENTRY
  61.     entryID As Long
  62.     attributes As Long
  63.     nameSpaceType As String * 1
  64.     nameLength As String * 1
  65.     name As String * 12
  66.     lastArchiveDateAndTime As Long
  67.     lastArchiverID As Long
  68.     modifyDateAndTime As Long
  69.     lastModifierID As Long
  70.     dataForkSize As Long
  71.     lastAccessedDate As Integer
  72.     deletedFileTime As Long
  73.     deletedDateAndTime As Long
  74.     deletorID As Long
  75. End Type
  76.  
  77. Declare Function EraseFiles Lib "NWNETAPI.DLL" (ByVal dirHandle%, ByVal filePath$, ByVal searchAttributes%) As Integer
  78. Declare Function FileServerFileCopy Lib "NWNETAPI.DLL" (ByVal sourceFileHandle%, ByVal destFileHandle%, ByVal sourceFileOffset&, ByVal destFileOffset&, ByVal bytesToCopy&, bytesCopied&) As Integer
  79. Declare Function GetExtendedFileAttributes Lib "NWNETAPI.DLL" (ByVal filePath$, extendedFileAttrib%) As Integer
  80. Declare Function PurgeAllErasedFiles Lib "NWNETAPI.DLL" () As Integer     '2.x only
  81. Declare Function PurgeErasedFiles Lib "NWNETAPI.DLL" () As Integer        '2.x only
  82. Declare Function PurgeSalvagableFile Lib "NWNETAPI.DLL" (ByVal serverConnID%, ByVal dirHandle%, entryID&, ByVal fileName$) As Integer      '3.x/4.x only
  83. Declare Function RecoverSalvagableFile Lib "NWNETAPI.DLL" (ByVal serverConnID%, ByVal dirHandle%, ByVal entryID&, ByVal fileName$, ByVal newName$) As Integer     '3.x/4.x only
  84. 'erasedFileName and restoredFileName must be initialized to 13 characters
  85. Declare Function RestoreErasedFile Lib "NWNETAPI.DLL" (ByVal dirHandle%, ByVal volName$, ByVal erasedFileName$, ByVal restoredFileName$) As Integer     '2.x only
  86. Declare Function ScanFileEntry Lib "NWNETAPI.DLL" (ByVal serverConnID%, ByVal dirHandle%, ByVal searchPath$, ByVal searchAttrib%, sequence&, fileEntry As NWFILE_ENTRY) As Integer     '3.x/4.x only
  87. 'fileName must be initialized to 15 bytes
  88. Declare Function ScanFileInformation Lib "NWNETAPI.DLL" (ByVal dirHndl%, ByVal path$, ByVal srchAttrib%, seq%, ByVal fileName$, attrib%, extAttrib%, size&, creat%, lastAcc%, updated&, archived&, owner&) As Integer
  89. Declare Function ScanFilePhysical Lib "NWNETAPI.DLL" (ByVal serverConnID%, ByVal dirHandle%, ByVal searchPath$, ByVal searchAttrib%, sequence&, fileEntry As NWPHYS_ENTRY) As Integer     '3.x/4.x only
  90. Declare Function ScanSalvagableFiles Lib "NWNETAPI.DLL" (ByVal serverConnID%, ByVal dirHandle%, entryID&, salvEntry As NWSALV_ENTRY) As Integer     '3.x/4.x only
  91. Declare Function SetExtendedFileAttributes Lib "NWNETAPI.DLL" (ByVal filePath$, ByVal extFileAttrib%) As Integer
  92. Declare Function SetFileInformation Lib "NWNETAPI.DLL" (ByVal dirHndl%, ByVal path$, ByVal searchAttrib%, ByVal attrib%, ByVal extAttrib%, ByVal created%, ByVal lastAcc%, ByVal updated&, ByVal archived&, ByVal owner&) As Integer
  93.  
  94.