Global Const TRUE = -1
Global Const FALSE = 0
Global Const MAXIMIZED = 2
Global Const DEFAULT = 0
Global Const HOURGLASS = 11

Global Const MAXDOCS = 100
Global max_docs%

Global s_change_accepted As Integer
Global sources_loaded As Integer

Global s_database(MAXDOCS) As String
Global s_port(MAXDOCS) As Long
Global s_service(MAXDOCS) As String

Global src_database(MAXDOCS) As String
Global src_port(MAXDOCS) As Long
Global src_service(MAXDOCS) As String
                        
Global title_doc_size(MAXDOCS) As Long
Global title_doc_bytes(MAXDOCS) As String
Global title_type(MAXDOCS) As String * 11

Global ref_doc_size(MAXDOCS) As Long
Global ref_doc_bytes(MAXDOCS) As String
Global ref_type(MAXDOCS) As String * 11
Global ref_start(MAXDOCS) As Long
Global ref_end(MAXDOCS) As Long

Type DOC
    score As Integer
    length As Long
    doc_size As Long
    type As String * 11
    doc_bytes As String * 200
    title As String * 70
End Type

Type REF
    ch_start As Long
    ch_end As Long
    doc_size As Long
    type As String * 11
    doc_bytes As String * 200
End Type

Declare Function reference_titles Lib "wais.dll" (ByVal func As Integer, ByVal tot_ref As Integer, reference As REF) As Integer
Declare Function query_titles Lib "wais.dll" (ByVal func As Integer, ByVal tot_ref As Integer, ByVal svr As String, ByVal db As String, ByVal kw As String, ByVal port As Long) As Integer
Declare Function get_titles Lib "wais.dll" (ByVal docno As Integer, headline As DOC) As Integer
Declare Function get_document Lib "wais.dll" (ByVal docno As Integer, ByVal tp As String) As Integer
Declare Function set_maxdocs Lib "wais.dll" (ByVal number As Integer) As Integer

