www.pudn.com > ipxspx.rar > GLOBAL.BAS


'Win SDK calls and Consts 
Global Const WM_USER = &H400 
Global Const LB_FINDSTRING = (WM_USER + 16) 
Global Const LB_ERR = (-1) 
 
Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long 
 
'Types used internally by NetChat to talk to NWCALLS.DLL 
'and receive the input 
 
Type USER_INFO 
    connNumber As Integer 
    objectName As String * 48 
    objectType As Integer 
    objectID As Long 
    loginTime As String * 7 
End Type 
 
 
Type InternetAddress 
    network As String * 4 
    node As String * 6 
End Type 
 
 
Type IPXAddress 
    network As String * 4 
    node As String * 6 
    socket As String * 2 
End Type 
 
Type IPXHeader 
    checkSum As Integer 
    length As Integer 
    transportControl As String * 1 
    packetType As String * 1 
    destination As IPXAddress 
    source As IPXAddress 
End Type 
 
Type NetChatInput 
    header As IPXHeader 
    data As String 
End Type 
 
Type FILE_SYS_STATS 
    systemElapsedTime As Long 
    maxOpenFiles As Integer 
    maxFilesOpen As Integer 
    currOpenFiles As Integer 
    totalFilesOpened As Long 
    totalReadRequests As Long 
    totalWriteRequests As Long 
    currChangedFATSectors As Integer 
    totalChangedFATSectors As Long 
    FATWriteErrors As Integer 
    fatalFATWriteErrors As Integer 
    FATScanErrors As Integer 
    maxIndexFilesOpened As Integer 
    currOpenIndexedFiles As Integer 
    attachedIndexFiles As Integer 
    availableindexFiles As Integer 
End Type 
 
Type CONN_USING_FILE 
  connNumber As Integer 
  taskNumber As Integer 
  lockType As Integer 
  accessControl As Integer 
  lockFlag As Integer 
End Type 
 
Type CONNS_USING_FILE 
  nextRequest As Integer 
  useCount As Integer 
  openCount As Integer 
  openForReadCount As Integer 
  openForWriteCount As Integer 
  denyReadCount As Integer 
  denyWriteCount As Integer 
  locked As Integer 
  forkCount As Integer 
  connCount As Integer 
  connInfo(70) As CONN_USING_FILE 
End Type 
 
'Constants used for NetChat sockets and packet types 
Global Const socketNumber = &H5454 
Global Const IPXSPX_CONNECT = &H0 
Global Const IPXSPX_DISCONNECT = &H1 
Global Const IPXSPX_DATA = &H2 
Global Const IPXSPX_SENDCONN = &H3 
Global Const IPXSPX_RECEIVECONN = &H4 
Global Const IPXSPX_RECEIVECONNMODAL = &H5 
 
'Global variables used with NetChat 
Global yourInetAddress As InternetAddress 
Global myInetAddress As InternetAddress 
Global nwConn As Integer 
Global nwConnNumber As Integer 
Global netWareUsers() As USER_INFO 
Global NetChatState As Integer 
 
 
'NWCALLS.DLL function prototypes 
Declare Sub NWGetFileServerName Lib "NWCALLS.DLL" (ByVal conn As Integer, ByVal servername As String) 
Declare Function NWGetConnectionHandle Lib "NWCALLS.DLL" (ByVal servername As String, ByVal reserver1 As Integer, conn As Integer, reserved2 As Any) As Integer 
Declare Function NWCallsInit Lib "NWCALLS.DLL" (ByVal in&, ByVal out&) As Integer 
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 
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 
Declare Function NWGetInternetAddress Lib "NWCALLS.DLL" (ByVal conn As Integer, ByVal connNumber As Integer, InternetAddress As InternetAddress) As Integer 
Declare Function NWGetConnectionNumber Lib "NWCALLS.DLL" (ByVal conn As Integer, connNumber As Integer) As Integer 
Declare Function NWGetConnectionList Lib "NWCALLS.DLL" (ByVal connMode As Integer, connListBuffer As Any, ByVal connListSize As Integer, numConnections As Integer) As Integer 
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