Declare Function TitleValid Lib "mvtitle2.dll" (ByVal hTitle As Integer) As Integer
Declare Function TitleOpen Lib "mvtitle2.dll" (ByVal szTitle As String) As Integer
Declare Sub TitleClose Lib "mvtitle2.dll" (ByVal hTitle As Integer)
Declare Function TitleGetInfo Lib "mvtitle2.dll" (ByVal hTitle As Integer, ByVal iInfoMsg As Integer, ByVal lParam1 As Long, ByVal lParam2 As Any) As Long
' TitleGetInfo() returns information corresponding to the following
' indexes. Pass them into TitleGetInfo() through the second parameter.
Global Const TTLINF_TITLE = 1
Global Const TTLINF_COPYRIGHT = 2
Global Const TTLINF_NUMTOPICS = 11
Global Const TTLINF_HASINDEX = 100
Global Const TTLINF_TOPICADDR = 101
Global Const TTLINF_TOPICTITLE = 102
Global Const TTLINF_FILENAME = 106
Global Const TTLINF_CUSTOMINFO = 256
' Use the following for access to topic lists.
Type QUERYERR
iError As Integer
iStart As Integer
iLength As Integer
End Type
Declare Function TopicListLoad Lib "mvtitle2.dll" (ByVal hTitle As Integer, ByVal szTopicListName As String) As Integer
Declare Function TopicListFromQuery Lib "mvtitle2.dll" (ByVal hTitle As Integer, ByVal iFlags As Integer, ByVal szQuery As String, ByVal hTopListDomain As Integer, ByVal iNear As Integer, ByVal lCallback As Long, iTopicList As Integer, qErr As QUERYERR)
Global Const IMPLICIT_AND = 0
Global Const IMPLICIT_OR = 1
Global Const IMPLICIT_NOT = 2
Global Const IMPLICIT_PHRASE = 3
Global Const IMPLICIT_NEAR = 4
Declare Function TopicListFromTopicNo Lib "mvtitle2.dll" (ByVal hTitle As Integer, ByVal lTopicNo As Long) As Integer
Declare Sub TopicListDestroy Lib "mvtitle2.dll" (ByVal hTopicList As Integer)
Declare Function TopicListLength Lib "mvtitle2.dll" (ByVal hTopicList As Integer) As Long
Declare Function TopicListLookup Lib "mvtitle2.dll" (ByVal hTopicList As Integer, ByVal lListIndex As Long) As Long
Declare Function TopicListCombine Lib "mvtitle2.dll" (ByVal iOperation As Integer, ByVal hTopicList1 As Integer, ByVal hTopicList2 As Integer, ByVal iReserved As Integer) As Integer
Global Const TL_AND = 0
Global Const TL_OR = 1
Global Const TL_NOT = 2
Global Const TL_QKEY = &H8000
' Use the following for access to the Highlight API.
Declare Function HighlightMatchFind Lib "mvtitle2.dll" (ByVal hHighlight As Integer, ByVal lTopic As Long, ByVal dwAddress As Long, dwOffset As Long, dwLength As Long) As Long
Declare Function HighlightMatchGet Lib "mvtitle2.dll" (ByVal hHighlight As Integer, ByVal lTopic As Long, ByVal lMatch As Long, dwOffset As Long, dwLength As Long) As Integer
Declare Function HighlightMatchCount Lib "mvtitle2.dll" (ByVal hHighlight As Integer, ByVal lTopic As Long) As Long
Declare Sub HighlightDestroy Lib "mvtitle2.dll" (ByVal hHighlight As Integer)
' Use the following for access to the Word Wheel API.
Declare Function WordWheelOpen Lib "mvtitle2.dll" (ByVal szTitle As String, ByVal szWheel As String) As Integer
Declare Sub WordWheelClose Lib "mvtitle2.dll" (ByVal hWheel As Integer)
Declare Function WordWheelLength Lib "mvtitle2.dll" (ByVal hWheel As Integer) As Long
Declare Function WordWheelPrefix Lib "mvtitle2.dll" (ByVal hWheel As Integer, ByVal szPrefix As String) As Long
Declare Function WordWheelLookup Lib "mvtitle2.dll" (ByVal hWheel As Integer, ByVal lPhraseNum As Long, ByVal szPhrase As String, ByVal iBufLen As Integer) As Integer
' Get the resource string corresponding to an error number
' returned from TopicListFromQuery()
Declare Function QueryGetErrorMessage Lib "mvtitle2.dll" (ByVal iErrorNum As Integer, ByVal szError As String, ByVal iBufLen As Integer) As Integer
' Error ranges
Global Const ERR_INTERNAL_BASE = 0
Global Const ERR_INTERNAL_MAX = (ERR_INTERNAL_BASE + 32)
Global Const ERR_GRAMMAR_BASE = 1900
Global Const ERR_GRAMMAR_MAX = (ERR_INTERNAL_BASE + 50)
Global Const ERR_LOADLIBRARY_BASE = 1950
Global Const ERR_LOADLIBRARY_MAX = (ERR_LOADLIBRARY_BASE + 32)
Global Const ERR_DOS_BASE = 2000
Global Const ERR_DOS_MAX = (ERR_DOS_BASE + 256)
' Error codes
Global Const ERR_SUCCESS = (ERR_INTERNAL_BASE + 0)
Global Const ERR_FAILED = (ERR_INTERNAL_BASE + 1)
Global Const ERR_IDXINTERRUPT = (ERR_INTERNAL_BASE + 2)
Global Const ERR_NEARMEMORY = (ERR_INTERNAL_BASE + 3)
Global Const ERR_MEMORY = (ERR_INTERNAL_BASE + 4)
Global Const ERR_DISKFULL = (ERR_INTERNAL_BASE + 5)
Global Const ERR_WORDTOOLONG = (ERR_INTERNAL_BASE + 6)
Global Const ERR_BADVERSION = (ERR_INTERNAL_BASE + 7)
Global Const ERR_TOOMANYDOCS = (ERR_INTERNAL_BASE + 8)
Global Const ERR_TOOMANYSTOPS = (ERR_INTERNAL_BASE + 9)
Global Const ERR_TOOLONGSTOPS = (ERR_INTERNAL_BASE + 10)
Global Const ERR_STEMTOOLONG = (ERR_INTERNAL_BASE + 11)
Global Const ERR_TREETOOBIG = (ERR_INTERNAL_BASE + 12)
Global Const ERR_CANTREAD = (ERR_INTERNAL_BASE + 13)
Global Const ERR_IDXSEGOVERFLOW = (ERR_INTERNAL_BASE + 14)
Global Const ERR_BADARG = (ERR_INTERNAL_BASE + 15)
Global Const ERR_VOCABTOOLARGE = (ERR_INTERNAL_BASE + 16)
Global Const ERR_GROUPIDTOOBIG = (ERR_INTERNAL_BASE + 17)
Global Const ERR_BADOPERATOR = (ERR_INTERNAL_BASE + 18)
Global Const ERR_TERMTOOCOMPLEX = (ERR_INTERNAL_BASE + 19)
Global Const ERR_SEARCHTOOCOMPLEX = (ERR_INTERNAL_BASE + 20)
Global Const ERR_BADSYSCONFIG = (ERR_INTERNAL_BASE + 21)
Global Const ERR_ASSERT = (ERR_INTERNAL_BASE + 22)
Global Const ERR_FILE_NOT_EXIST = (ERR_INTERNAL_BASE + 23)
Global Const ERR_INVALID_FS_FILE = (ERR_INTERNAL_BASE + 24)
Global Const ERR_OUT_OF_RANGE = (ERR_INTERNAL_BASE + 25)
Global Const ERR_SEEK_FAILED = (ERR_INTERNAL_BASE + 26)
Global Const ERR_FILECREAT_FAILED = (ERR_INTERNAL_BASE + 27)
Global Const ERR_CANTWRITE = (ERR_INTERNAL_BASE + 28)
Global Const ERR_NOHANDLE = (ERR_INTERNAL_BASE + 29)
Global Const ERR_EXIST = (ERR_INTERNAL_BASE + 30)
Global Const ERR_INVALID_HANDLE = (ERR_INTERNAL_BASE + 31)
Global Const ERR_BADFILEFORMAT = (ERR_INTERNAL_BASE + 32)
Global Const ERR_NULLQUERY = (ERR_GRAMMAR_BASE + 0)
Global Const ERR_EXPECTEDTERM = (ERR_GRAMMAR_BASE + 1)
Global Const ERR_EXTRACHARS = (ERR_GRAMMAR_BASE + 2)
Global Const ERR_MISSQUOTE = (ERR_GRAMMAR_BASE + 3)
Global Const ERR_MISSLPAREN = (ERR_GRAMMAR_BASE + 4)
Global Const ERR_MISSRPAREN = (ERR_GRAMMAR_BASE + 5)
Global Const ERR_TOODEEP = (ERR_GRAMMAR_BASE + 6)
Global Const ERR_TOOMANYTOKENS = (ERR_GRAMMAR_BASE + 7)
Global Const ERR_BADFORMAT = (ERR_GRAMMAR_BASE + 8)
Global Const ERR_BADVALUE = (ERR_GRAMMAR_BASE + 9)
Global Const ERR_UNMATCHEDTYPE = (ERR_GRAMMAR_BASE + 10)
Global Const ERR_BADBREAKER = (ERR_GRAMMAR_BASE + 11)
Global Const ERR_BADRANGEOP = (ERR_GRAMMAR_BASE + 12)
Global Const ERR_ALL_WILD = (ERR_GRAMMAR_BASE + 13)
Global Const ERR_NON_LAST_WILD = (ERR_GRAMMAR_BASE + 14)
Global Const ERR_WILD_IN_DTYPE = (ERR_GRAMMAR_BASE + 15)
Global Const cmdoptNONE = 0
Global Const cmdoptHIDE = 1
Global Const GI_MAINHWND = 2 ' handle of main window
Global Const GI_CURRHWND = 3 ' handle of active window
Global Const GI_FGCOLOR = 5 ' foreground color in specified region
Global Const GI_BKCOLOR = 6 ' background color in specified region
Global Const GI_TOPICNO = 7 ' current topic in specified region
Global Const GI_HPATH = 8 ' filename of topic in specified window
Global Const GI_HWNDSRMAIN = 11 ' handle to main scrolling region
Global Const GI_HWNDNSRMAIN = 13 ' handle to main nonscrolling region
Global Const GI_TOPADDR = 16 ' top address in specified region
Global Const GI_BOTADDR = 17 ' bottom address in specified region
' External declarations for APIs in mvapi2.dll.
Declare Function VwrFromMVB Lib "mvapi2.dll" (ByVal szMVB As String) As Integer
Declare Function VwrCommand Lib "mvapi2.dll" (ByVal iVwr As Integer, ByVal szMVB As Any, ByVal szMacro As String, ByVal iCmdOptions As Integer) As Integer
Declare Function VwrQuit Lib "mvapi2.dll" (ByVal iVwr As Integer) As Integer
Declare Function HwndFromVwr Lib "mvapi2.dll" (ByVal iVwr As Integer) As Integer
Declare Function VwrFromHwnd Lib "mvapi2.dll" (ByVal hWnd As Integer) As Integer
Declare Function VwrFromHinst Lib "mvapi2.dll" (ByVal hInst As Integer) As Integer
Declare Function VwrGetInfo Lib "mvapi2.dll" (ByVal iVwr As Integer, ByVal iInfoMsg As Integer, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long