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

  1. 'NWSERVER.BAS  NetWare File Server Environment 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. Type CON_OPEN_FILES
  9.     taskNumber As String * 1
  10.     lockStatus As String * 1
  11.     accessFlag As String * 1
  12.     lockType As String * 1
  13.     volumeNumber As String * 1
  14.     reserved As String * 1
  15.     directoryEntry As Integer
  16.     fileName As String * 15
  17. End Type
  18.  
  19. Type CONN_SEMAPHORE
  20.     openCount As Long
  21.     semaphoreValue As String * 1
  22.     taskNumber As String * 1
  23.     semaphoreName As String * 128
  24. End Type
  25.  
  26. Type CONN_TASK_INFO
  27.     lockStatus As String * 1
  28.     waitingTaskNumber As String * 1
  29.     beginAddress As Long
  30.     endAddress As Long
  31.     volumeNumber As String * 1
  32.     numberOfTasks As String * 1
  33.     directoryEntry As Integer
  34.     lockedName As String * 50
  35.     taskNumber As String * 1
  36.     taskState As String * 1
  37. End Type
  38.  
  39. Type CONN_USAGE
  40.     systemElapsedTime As Long
  41.     bytesRead As String * 6
  42.     bytesWritten As String * 6
  43.     totalRequestPackets As Long
  44. End Type
  45.  
  46. Type CONN_USING_FILE
  47.     useCount As Integer
  48.     openCount As Integer
  49.     openForReadCount As Long
  50.     openForWriteCount As Long
  51.     denyReadCount As Long
  52.     denyWriteCount As Long
  53.     reserved1 As Integer
  54.     locked As String * 1
  55.     reserved2 As String * 1
  56.     logicalConnNumber As Long
  57.     taskNumber As String * 1
  58.     lockType As String * 1
  59.     accessFlags As String * 1
  60.     lockStatus As String * 1
  61. End Type
  62.  
  63. Type DISK_CACHE_STATS
  64.     systemElapsedTime As Long
  65.     cacheBufferCount As Integer
  66.     cacheBufferSize As Integer
  67.     dirtyCacheBuffers As Integer
  68.     cacheReadRequests As Long
  69.     cacheWriteRequests As Long
  70.     cacheHits As Long
  71.     cacheMisses As Long
  72.     physicalReadRequests As Long
  73.     physicalWriteRequests As Long
  74.     physicalReadErrors As Integer
  75.     physicalWriteErrors As Integer
  76.     cacheGetRequests As Long
  77.     cacheFullWriteRequests As Long
  78.     cachePartialWriteRequests As Long
  79.     backgroundDirtyWrites As Long
  80.     backgroundAgedWrites As Long
  81.     totalCacheWrites As Long
  82.     cacheAllocations As Long
  83.     thrashingCount As Integer
  84.     LRUBlockWasDirtyCount As Integer
  85.     readBeyondWriteCount As Integer
  86.     fragmentedWriteCount As Integer
  87.     cacheHitOnUnavailCount As Integer
  88.     cacheBlockScrappedCount As Integer
  89. End Type
  90.  
  91. Type DISK_CHANNEL_STATS
  92.     systemElapsedTime As Long
  93.     channelState As Integer
  94.     channelSyncState As Integer
  95.     driverType As String * 1
  96.     driverMajorVersion As String * 1
  97.     driverMinorVersion As String * 1
  98.     driverDescription As String * 65
  99.     IOAddr1 As Integer
  100.     IOAddr1Size As Integer
  101.     IOAddr2 As Integer
  102.     IOAddr2Size As Integer
  103.     sharedMem1Seg As String * 3
  104.     sharedMem1Off As Integer
  105.     sharedMem2Seg As String * 3
  106.     sharedMem2Off As Integer
  107.     interrupt1Used As String * 1
  108.     interrupt1 As String * 1
  109.     interrupt2Used As String * 1
  110.     interrupt2 As String * 1
  111.     DMAChannel1Used As String * 1
  112.     DMAChannel1 As String * 1
  113.     DMAChannel2Used As String * 1
  114.     DMAChannel2 As String * 1
  115.     reserved2 As Integer
  116.     configDescription As String * 80
  117. End Type
  118.  
  119. Type DRIVE_MAP_TABLE
  120.     systemElapsedTime As Long
  121.     SFTLevel As String * 1
  122.     logicalDriveCount As String * 1
  123.     physicalDriveCount As String * 1
  124.     diskChannelTable As String * 5
  125.     pendingIOCommands As Integer
  126.     mappingTable As String * 32
  127.     driveMirrorTable As String * 32
  128.     deadMirrorTable As String * 32
  129.     remirroredDrive As String * 1
  130.     reserved As String * 1
  131.     remirroredBlock As Long
  132.     SFTErrorTable As String * 120
  133. End Type
  134.  
  135. Type SERVER_LAN_IO
  136.     systemElapsedTime As Long
  137.     maxRoutingBuffersAvail As Integer
  138.     maxRoutingBuffersUsed As Integer
  139.     routingBuffersInUse As Integer
  140.     totalFileServicePackets As Long
  141.     fileServicePacketsBuffered As Integer
  142.     invalidConnPacketCount As Long
  143.     badLogicalConnCount As Long
  144.     packetsRcvdDuringProcCount As Integer
  145.     reprocessedRequestCount As Integer
  146.     badSequenceNumberPacketCount As Integer
  147.     duplicateReplyCount As Integer
  148.     acknowledgementsSent As Integer
  149.     badRequestTypeCount As Integer
  150.     attachDuringProcCount As Integer
  151.     attachWhileAttachingCount As Integer
  152.     forgedDetachRequestCount As Integer
  153.     badConnNumberOnDetachCount As Long
  154.     detachDuringProcCount As Integer
  155.     repliesCanceledCount As Integer
  156.     hopCountDiscardCount As Integer
  157.     unknownNetDiscardCount As Integer
  158.     noDGroupBufferDiscardCount As Integer
  159.     outPacketNoBufferDiscardCount As Integer
  160.     IPXNotMyNetworkCount As Integer
  161.     NetBIOSPropagationCount As Long
  162.     totalOtherPackets As Long
  163.     totalRoutedPackets As Long
  164. End Type
  165.  
  166. Type SERVER_MISC_INFO
  167.     systemElapsedTime As Long
  168.     processorType As String * 1
  169.     reserved As String * 1
  170.     serviceProcessCount As String * 1
  171.     serverUtilizationPercent As String * 1
  172.     maxBinderyObjectsAvail As Integer
  173.     maxBinderyObjectsUsed As Integer
  174.     binderyObjectsInUse As Integer
  175.     serverMemoryInK As Integer
  176.     dynamicAreaCount As Integer
  177.     dynamicSpace1 As Long
  178.     maxUsedDynamicSpace1 As Long
  179.     dynamicSpaceInUse1 As Long
  180.     dynamicSpace2 As Long
  181.     maxUsedDynamicSpace2 As Long
  182.     dynamicSpaceInUse2 As Long
  183.     dynamicSpace3 As Long
  184.     maxUsedDynamicSpace3 As Long
  185.     dynamicSpaceInUse3 As Long
  186. End Type
  187.  
  188. Type FILE_SYS_STATS
  189.     systemElapsedTime As Long
  190.     maxOpenFiles As Integer
  191.     maxFilesOpen As Integer
  192.     currOpenFiles As Integer
  193.     totalFilesOpened As Long
  194.     totalReadRequests As Long
  195.     totalWriteRequests As Long
  196.     currChangedFATSectors As Integer
  197.     totalChangedFATSectors As Long
  198.     FATWriteErrors As Integer
  199.     fatalFATWriteErrors As Integer
  200.     FATScanErrors As Integer
  201.     maxIndexFilesOpened As Integer
  202.     currOpenIndexedFiles As Integer
  203.     attachedIndexFiles As Integer
  204.     availableindexFiles As Integer
  205. End Type
  206.  
  207. Type LAN_CONFIG
  208.     networkAddress As Long
  209.     hostAddress1 As Long
  210.     hostAddress2 As Integer
  211.     LANDriverInstalled As String * 1
  212.     optionNumber As String * 1
  213.     configurationText1 As String * 80
  214.     configuratinoText2 As String * 80
  215. End Type
  216.  
  217. Type LOGICAL_REC_INFO
  218.     currentUseCount As Integer
  219.     shareableLockCount As Integer
  220.     reserved1 As Integer
  221.     locked As String * 1
  222.     reserved2 As String * 1
  223.     logicalConnectionNumber As Long
  224.     taskNumber As String * 1
  225.     lockStatus As String * 1
  226. End Type
  227.  
  228. Type LOGICAL_RECORD
  229.     taskNumber As String * 1
  230.     lockStatus As String * 1
  231.     logicalLockName As String * 102
  232. End Type
  233.  
  234. Type PHYS_DISK_STATS
  235.     systemElapsedTime As Long
  236.     diskChannel As String * 1
  237.     diskRemovable As String * 1
  238.     driveType As String * 1
  239.     controllerDriverNumber As String * 1
  240.     controllerNumber As String * 1
  241.     controllerType As String * 1
  242.     driveSize As Long
  243.     driveCylinders As Integer
  244.     driveHeads As String * 1
  245.     sectorsPerTrack As String * 1
  246.     IOErrorCount As Integer
  247.     hotFixStart As Long
  248.     hotFixSize As Integer
  249.     hotFixSizeAvailable As Integer
  250.     hotFixDisabled As String * 1
  251. End Type
  252.  
  253. Type PHYS_REC_LOCK
  254.     physicalRecordLockCount As String * 1
  255.     reserved As String * 1
  256.     loggedCount As Integer
  257.     shareLockCount As Integer
  258.     recordStart As Long
  259.     recordEnd As Long
  260.     connectionNumber As Long
  261.     taskNumber As String * 1
  262.     lockType As String * 1
  263. End Type
  264.  
  265. Type SHORT_PHYS_REC_LOCK
  266.     taskNumber As String * 1
  267.     lockFlag As String * 1
  268.     recordStart As Long
  269.     recordEnd As Long
  270. End Type
  271.  
  272. Type FILE_SERV_INFO
  273.     serverName As String * 48
  274.     netwareVersion As String * 1
  275.     netwareSubVersion As String * 1
  276.     maxConnectionsSupported As Long
  277.     connectionsInUse As Long
  278.     maxVolumesSupported As Integer
  279.     revisionLevel As String * 1
  280.     SFTLevel As String * 1
  281.     TTSLevel As String * 1
  282.     peakConnectionsUsed As Long
  283.     accountingVersion As String * 1
  284.     VAPversion As String * 1
  285.     queueingVersion As String * 1
  286.     printServerVersion As String * 1
  287.     virtualConsoleVersion As String * 1
  288.     securityRestrictionLevel As String * 1
  289.     internetBridgeSupport As String * 1
  290. End Type
  291.  
  292. Declare Function CheckConsolePrivileges Lib "NWNETAPI.DLL" () As Integer
  293. Declare Function CheckNetWareVersion Lib "NWNETAPI.DLL" (ByVal minVersion%, ByVal minSubVersion%, ByVal minRevision%, ByVal minSFT%, ByVal minTTS%) As Integer
  294. Declare Function ClearConnectionNumber Lib "NWNETAPI.DLL" (ByVal connNumber&) As Integer    'documentation says 2.x only, but it works in 3.x
  295. Declare Function DisableFileServerLogin Lib "NWNETAPI.DLL" () As Integer
  296. Declare Function DisableTransactionTracking Lib "NWNETAPI.DLL" () As Integer
  297. Declare Function DownFileServer Lib "NWNETAPI.DLL" (ByVal forceFlag%) As Integer
  298. Declare Function EnableFileServerLogin Lib "NWNETAPI.DLL" () As Integer
  299. Declare Function EnableTransactionTracking Lib "NWNETAPI.DLL" () As Integer
  300. Declare Function GetConnectionsOpenFiles Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, lastRecord%, lastTask%, ByVal structSize%, openFiles As CON_OPEN_FILES) As Integer   '2.x only
  301. Declare Function GetConnectionsSemaphores Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, lastRecord%, lastTask%, ByVal structSize%, connSemaphores As CONN_SEMAPHORE) As Integer    '2.x only
  302. Declare Function GetConnectionsTaskInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, taskPointer%, ByVal structSize%, connTaskInfo As CONN_TASK_INFO) As Integer           '2.x only
  303. Declare Function GetConnectionsUsageStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, ByVal structSize%, connUsage As CONN_USAGE) As Integer     '2.x only
  304. Declare Function GetConnectionsUsingFile Lib "NWNETAPI.DLL" (ByVal connID%, lastRecord%, taskID%, ByVal dirHandle%, ByVal filePath$, ByVal structSize%, fileUse As CONN_USING_FILE) As Integer  '2.x only
  305. Declare Function GetDiskCacheStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, cacheStats As DISK_CACHE_STATS) As Integer     '2.x only
  306. Declare Function GetDiskChannelStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal channelNumber%, ByVal structSize%, channelStats As DISK_CHANNEL_STATS) As Integer     '2.x only
  307. Declare Function GetDiskUtilization Lib "NWNETAPI.DLL" (ByVal objectID&, ByVal volNumber%, usedDirectories%, usedFiles%, usedBlocks%) As Integer
  308. Declare Function GetDriveMappingTable Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, driveMappingTable As DRIVE_MAP_TABLE) As Integer        '2.x only
  309. Declare Sub GetFileServerDateAndTime Lib "NWNETAPI.DLL" (dateAndTime As DATE_AND_TIME)
  310. 'companyName, revision, and copyrightNotice must be initialized to 80 bytes
  311. 'revisionDate must be initialized to 24 bytes
  312. Declare Function GetFileServerDescriptionStrings Lib "NWNETAPI.DLL" (ByVal companyName$, ByVal revision$, ByVal revisionDate$, ByVal copyrightNotice$) As Integer
  313. Declare Function GetFileServerLANIOStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, serverLANIOStats As SERVER_LAN_IO) As Integer        '2.x only
  314. Declare Function GetFileServerLoginStatus Lib "NWNETAPI.DLL" (loginEnabledFlag%) As Integer
  315. Declare Function GetFileServerMiscInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, miscInfo As SERVER_MISC_INFO) As Integer       '2.x only
  316. Declare Sub GetFileServerName Lib "NWNETAPI.DLL" (ByVal connID%, ByVal fileServerName$)
  317. Declare Function GetFileSystemStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal structSize%, fileSysStats As FILE_SYS_STATS) As Integer        '2.x only
  318. Declare Function GetLANDriverConfigInfo Lib "NWNETAPI.DLL" (ByVal connID%, ByVal LANBoardNumber%, ByVal structSize%, LANConfig As LAN_CONFIG) As Integer    '2.x only
  319. Declare Function GetLogicalRecordInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal logicalRecordName$, lastRecord%, lastTask%, ByVal structSize%, logicalRecordInfo As LOGICAL_REC_INFO) As Integer  '2.x only
  320. Declare Function GetLogicalRecordByConnection Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, lastRecord%, lastTask%, ByVal structSize%, logicalRecord As LOGICAL_RECORD) As Integer   '2.x only
  321. 'path$ must be initialized to 255 bytes
  322. Declare Function GetPathFromDirectoryEntry Lib "NWNETAPI.DLL" (ByVal connID%, ByVal volumeNumber%, ByVal directoryEntry%, ByVal path$) As Integer   '2.x only
  323. 'driveDefinition$ must be initialized to ?? bytes
  324. Declare Function GetPhysicalDiskStats Lib "NWNETAPI.DLL" (ByVal connID%, ByVal physDiskNumber%, ByVal structSize%, physDiskStats As PHYS_DISK_STATS, ByVal driveDefinition$) As Integer   '2.x only
  325. Declare Function GetPhysicalRecordLocksByFile Lib "NWNETAPI.DLL" (ByVal connID%, ByVal dirHandle%, ByVal filePath$, lastRecord%, lastTask%, ByVal structSize%, recordLock As PHYS_REC_LOCK) As Integer   '2.x only
  326. Declare Function GetPhysRecLockByConnectAndFile Lib "NWNETAPI.DLL" (ByVal connID%, ByVal connNum&, ByVal volNum%, ByVal dirHandle%, ByVal filePath$, lastRecord%, lastTask%, ByVal structSize%, recLock As SHORT_PHYS_REC_LOCK) As Integer  '2.x only
  327. Declare Function GetSemaphoreInformation Lib "NWNETAPI.DLL" (ByVal connID%, ByVal semaphoreName$, lastRecord%, lastTask%, openCount&, semaphoreValue%, connNum&, taskNumber%) As Integer  '2.x only
  328. Declare Function GetServerInformation Lib "NWNETAPI.DLL" (ByVal structSize%, serverInfo As FILE_SERV_INFO) As Integer       'documentation says 2.x only, but it works in 3.x
  329. Declare Function SendConsoleBroadcast Lib "NWNETAPI.DLL" (ByVal message$, ByVal connCount%, connList&) As Integer
  330. Declare Function SetFileServerDateAndTime Lib "NWNETAPI.DLL" (ByVal theYear%, ByVal theMonth%, ByVal theDay%, ByVal theHour%, ByVal theMin%, ByVal theSec%) As Integer
  331.  
  332.