home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / ipx_spx / global.bas < prev    next >
BASIC Source File  |  1994-04-11  |  4KB  |  116 lines

  1. 'Win SDK calls and Consts
  2. Global Const WM_USER = &H400
  3. Global Const LB_FINDSTRING = (WM_USER + 16)
  4. Global Const LB_ERR = (-1)
  5.  
  6. Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
  7.  
  8. 'Types used internally by NetChat to talk to NWCALLS.DLL
  9. 'and receive the input
  10.  
  11. Type USER_INFO
  12.     connNumber As Integer
  13.     objectName As String * 48
  14.     objectType As Integer
  15.     objectID As Long
  16.     loginTime As String * 7
  17. End Type
  18.  
  19.  
  20. Type InternetAddress
  21.     network As String * 4
  22.     node As String * 6
  23. End Type
  24.  
  25.  
  26. Type IPXAddress
  27.     network As String * 4
  28.     node As String * 6
  29.     socket As String * 2
  30. End Type
  31.  
  32. Type IPXHeader
  33.     checkSum As Integer
  34.     length As Integer
  35.     transportControl As String * 1
  36.     packetType As String * 1
  37.     destination As IPXAddress
  38.     source As IPXAddress
  39. End Type
  40.  
  41. Type NetChatInput
  42.     header As IPXHeader
  43.     data As String
  44. End Type
  45.  
  46. Type FILE_SYS_STATS
  47.     systemElapsedTime As Long
  48.     maxOpenFiles As Integer
  49.     maxFilesOpen As Integer
  50.     currOpenFiles As Integer
  51.     totalFilesOpened As Long
  52.     totalReadRequests As Long
  53.     totalWriteRequests As Long
  54.     currChangedFATSectors As Integer
  55.     totalChangedFATSectors As Long
  56.     FATWriteErrors As Integer
  57.     fatalFATWriteErrors As Integer
  58.     FATScanErrors As Integer
  59.     maxIndexFilesOpened As Integer
  60.     currOpenIndexedFiles As Integer
  61.     attachedIndexFiles As Integer
  62.     availableindexFiles As Integer
  63. End Type
  64.  
  65. Type CONN_USING_FILE
  66.   connNumber As Integer
  67.   taskNumber As Integer
  68.   lockType As Integer
  69.   accessControl As Integer
  70.   lockFlag As Integer
  71. End Type
  72.  
  73. Type CONNS_USING_FILE
  74.   nextRequest As Integer
  75.   useCount As Integer
  76.   openCount As Integer
  77.   openForReadCount As Integer
  78.   openForWriteCount As Integer
  79.   denyReadCount As Integer
  80.   denyWriteCount As Integer
  81.   locked As Integer
  82.   forkCount As Integer
  83.   connCount As Integer
  84.   connInfo(70) As CONN_USING_FILE
  85. End Type
  86.  
  87. 'Constants used for NetChat sockets and packet types
  88. Global Const socketNumber = &H5454
  89. Global Const IPXSPX_CONNECT = &H0
  90. Global Const IPXSPX_DISCONNECT = &H1
  91. Global Const IPXSPX_DATA = &H2
  92. Global Const IPXSPX_SENDCONN = &H3
  93. Global Const IPXSPX_RECEIVECONN = &H4
  94. Global Const IPXSPX_RECEIVECONNMODAL = &H5
  95.  
  96. 'Global variables used with NetChat
  97. Global yourInetAddress As InternetAddress
  98. Global myInetAddress As InternetAddress
  99. Global nwConn As Integer
  100. Global nwConnNumber As Integer
  101. Global netWareUsers() As USER_INFO
  102. Global NetChatState As Integer
  103.  
  104.  
  105. 'NWCALLS.DLL function prototypes
  106. Declare Sub NWGetFileServerName Lib "NWCALLS.DLL" (ByVal conn As Integer, ByVal servername As String)
  107. Declare Function NWGetConnectionHandle Lib "NWCALLS.DLL" (ByVal servername As String, ByVal reserver1 As Integer, conn As Integer, reserved2 As Any) As Integer
  108. Declare Function NWCallsInit Lib "NWCALLS.DLL" (ByVal in&, ByVal out&) As Integer
  109. Declare Function NWGetFileServerInformation Lib "NWCALLS.DLL" (ByVal conn As Integer, servername As Any, majVer As Any, minVer As Any, rev As Any, maxConn As Any, maxConnUsed As Any, maxConnsInuse As Any, numVol As Any, sft As Any, tts As Any) As Integer
  110. Declare Function NWGetConnectionInformation Lib "NWCALLS.DLL" (ByVal conn As Integer, ByVal connNumber As Integer, objectName As Any, objectType As Any, objectID As Any, loginTime As Any) As Integer
  111. Declare Function NWGetInternetAddress Lib "NWCALLS.DLL" (ByVal conn As Integer, ByVal connNumber As Integer, InternetAddress As InternetAddress) As Integer
  112. Declare Function NWGetConnectionNumber Lib "NWCALLS.DLL" (ByVal conn As Integer, connNumber As Integer) As Integer
  113. Declare Function NWGetConnectionList Lib "NWCALLS.DLL" (ByVal connMode As Integer, connListBuffer As Any, ByVal connListSize As Integer, numConnections As Integer) As Integer
  114. Declare Function NWScanConnectionsUsingFile Lib "NWCALLS.DLL" (ByVal connID As Integer, ByVal dirHandle As Integer, path As Any, lastRecord As Integer, fileUse As CONN_USING_FILE, fileUsed As CONNS_USING_FILE) As Integer        '2.x only
  115.  
  116.