home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Multimedia Jumpstart 1.1a / CD_ROM.BIN / develpmt / source / roadshow / viewer.txt < prev    next >
Text File  |  1993-10-14  |  9KB  |  166 lines

  1. ' VBVIEWER.TXT
  2.  
  3. ' Visual Basic Declarations for Viewer APIs
  4.  
  5. Declare Function TitleValid Lib "mvtitle2.dll" (ByVal hTitle As Integer) As Integer
  6. Declare Function TitleOpen Lib "mvtitle2.dll" (ByVal szTitle As String) As Integer
  7. Declare Sub TitleClose Lib "mvtitle2.dll" (ByVal hTitle As Integer)
  8. Declare Function TitleGetInfo Lib "mvtitle2.dll" (ByVal hTitle As Integer, ByVal iInfoMsg As Integer, ByVal lParam1 As Long, ByVal lParam2 As Any) As Long
  9.  
  10. ' TitleGetInfo() returns information corresponding to the following
  11. ' indexes.  Pass them into TitleGetInfo() through the second parameter.
  12.  
  13. Global Const TTLINF_TITLE = 1
  14. Global Const TTLINF_COPYRIGHT = 2
  15. Global Const TTLINF_NUMTOPICS = 11
  16. Global Const TTLINF_HASINDEX = 100
  17. Global Const TTLINF_TOPICADDR = 101
  18. Global Const TTLINF_TOPICTITLE = 102
  19. Global Const TTLINF_FILENAME = 106
  20. Global Const TTLINF_CUSTOMINFO = 256
  21.  
  22. ' Use the following for access to topic lists.
  23.  
  24. Type QUERYERR
  25.   iError As Integer
  26.   iStart As Integer
  27.   iLength As Integer
  28. End Type
  29.  
  30. Declare Function TopicListLoad Lib "mvtitle2.dll" (ByVal hTitle As Integer, ByVal szTopicListName As String) As Integer
  31. 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)
  32.  
  33. Global Const IMPLICIT_AND = 0
  34. Global Const IMPLICIT_OR = 1
  35. Global Const IMPLICIT_NOT = 2
  36. Global Const IMPLICIT_PHRASE = 3
  37. Global Const IMPLICIT_NEAR = 4
  38.  
  39. Declare Function TopicListFromTopicNo Lib "mvtitle2.dll" (ByVal hTitle As Integer, ByVal lTopicNo As Long) As Integer
  40. Declare Sub TopicListDestroy Lib "mvtitle2.dll" (ByVal hTopicList As Integer)
  41.  
  42. Declare Function TopicListLength Lib "mvtitle2.dll" (ByVal hTopicList As Integer) As Long
  43. Declare Function TopicListLookup Lib "mvtitle2.dll" (ByVal hTopicList As Integer, ByVal lListIndex As Long) As Long
  44. Declare Function TopicListCombine Lib "mvtitle2.dll" (ByVal iOperation As Integer, ByVal hTopicList1 As Integer, ByVal hTopicList2 As Integer, ByVal iReserved As Integer) As Integer
  45.  
  46. Global Const TL_AND = 0
  47. Global Const TL_OR = 1
  48. Global Const TL_NOT = 2
  49. Global Const TL_QKEY = &H8000
  50.  
  51. ' Use the following for access to the Highlight API.
  52.  
  53. 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
  54. 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
  55. Declare Function HighlightMatchCount Lib "mvtitle2.dll" (ByVal hHighlight As Integer, ByVal lTopic As Long) As Long
  56. Declare Sub HighlightDestroy Lib "mvtitle2.dll" (ByVal hHighlight As Integer)
  57.  
  58. '  Use the following for access to the Word Wheel API.
  59.  
  60. Declare Function WordWheelOpen Lib "mvtitle2.dll" (ByVal szTitle As String, ByVal szWheel As String) As Integer
  61. Declare Sub WordWheelClose Lib "mvtitle2.dll" (ByVal hWheel As Integer)
  62. Declare Function WordWheelLength Lib "mvtitle2.dll" (ByVal hWheel As Integer) As Long
  63. Declare Function WordWheelPrefix Lib "mvtitle2.dll" (ByVal hWheel As Integer, ByVal szPrefix As String) As Long
  64. Declare Function WordWheelLookup Lib "mvtitle2.dll" (ByVal hWheel As Integer, ByVal lPhraseNum As Long, ByVal szPhrase As String, ByVal iBufLen As Integer) As Integer
  65.  
  66. ' Get the resource string corresponding to an error number
  67. ' returned from TopicListFromQuery()
  68.  
  69. Declare Function QueryGetErrorMessage Lib "mvtitle2.dll" (ByVal iErrorNum As Integer, ByVal szError As String, ByVal iBufLen As Integer) As Integer
  70.  
  71.  
  72. ' Error ranges
  73.  
  74. Global Const ERR_INTERNAL_BASE = 0
  75. Global Const ERR_INTERNAL_MAX = (ERR_INTERNAL_BASE + 32)
  76.  
  77. Global Const ERR_GRAMMAR_BASE = 1900
  78. Global Const ERR_GRAMMAR_MAX = (ERR_INTERNAL_BASE + 50)
  79.  
  80. Global Const ERR_LOADLIBRARY_BASE = 1950
  81. Global Const ERR_LOADLIBRARY_MAX = (ERR_LOADLIBRARY_BASE + 32)
  82.  
  83. Global Const ERR_DOS_BASE = 2000
  84. Global Const ERR_DOS_MAX = (ERR_DOS_BASE + 256)
  85.  
  86.  
  87. ' Error codes
  88.  
  89. Global Const ERR_SUCCESS = (ERR_INTERNAL_BASE + 0)
  90. Global Const ERR_FAILED = (ERR_INTERNAL_BASE + 1)
  91. Global Const ERR_IDXINTERRUPT = (ERR_INTERNAL_BASE + 2)
  92. Global Const ERR_NEARMEMORY = (ERR_INTERNAL_BASE + 3)
  93. Global Const ERR_MEMORY = (ERR_INTERNAL_BASE + 4)
  94. Global Const ERR_DISKFULL = (ERR_INTERNAL_BASE + 5)
  95. Global Const ERR_WORDTOOLONG = (ERR_INTERNAL_BASE + 6)
  96. Global Const ERR_BADVERSION = (ERR_INTERNAL_BASE + 7)
  97. Global Const ERR_TOOMANYDOCS = (ERR_INTERNAL_BASE + 8)
  98. Global Const ERR_TOOMANYSTOPS = (ERR_INTERNAL_BASE + 9)
  99. Global Const ERR_TOOLONGSTOPS = (ERR_INTERNAL_BASE + 10)
  100. Global Const ERR_STEMTOOLONG = (ERR_INTERNAL_BASE + 11)
  101. Global Const ERR_TREETOOBIG = (ERR_INTERNAL_BASE + 12)
  102. Global Const ERR_CANTREAD = (ERR_INTERNAL_BASE + 13)
  103. Global Const ERR_IDXSEGOVERFLOW = (ERR_INTERNAL_BASE + 14)
  104. Global Const ERR_BADARG = (ERR_INTERNAL_BASE + 15)
  105. Global Const ERR_VOCABTOOLARGE = (ERR_INTERNAL_BASE + 16)
  106. Global Const ERR_GROUPIDTOOBIG = (ERR_INTERNAL_BASE + 17)
  107. Global Const ERR_BADOPERATOR = (ERR_INTERNAL_BASE + 18)
  108. Global Const ERR_TERMTOOCOMPLEX = (ERR_INTERNAL_BASE + 19)
  109. Global Const ERR_SEARCHTOOCOMPLEX = (ERR_INTERNAL_BASE + 20)
  110. Global Const ERR_BADSYSCONFIG = (ERR_INTERNAL_BASE + 21)
  111. Global Const ERR_ASSERT = (ERR_INTERNAL_BASE + 22)
  112. Global Const ERR_FILE_NOT_EXIST = (ERR_INTERNAL_BASE + 23)
  113. Global Const ERR_INVALID_FS_FILE = (ERR_INTERNAL_BASE + 24)
  114. Global Const ERR_OUT_OF_RANGE = (ERR_INTERNAL_BASE + 25)
  115. Global Const ERR_SEEK_FAILED = (ERR_INTERNAL_BASE + 26)
  116. Global Const ERR_FILECREAT_FAILED = (ERR_INTERNAL_BASE + 27)
  117. Global Const ERR_CANTWRITE = (ERR_INTERNAL_BASE + 28)
  118. Global Const ERR_NOHANDLE = (ERR_INTERNAL_BASE + 29)
  119. Global Const ERR_EXIST = (ERR_INTERNAL_BASE + 30)
  120. Global Const ERR_INVALID_HANDLE = (ERR_INTERNAL_BASE + 31)
  121. Global Const ERR_BADFILEFORMAT = (ERR_INTERNAL_BASE + 32)
  122.  
  123.  
  124. Global Const ERR_NULLQUERY = (ERR_GRAMMAR_BASE + 0)
  125. Global Const ERR_EXPECTEDTERM = (ERR_GRAMMAR_BASE + 1)
  126. Global Const ERR_EXTRACHARS = (ERR_GRAMMAR_BASE + 2)
  127. Global Const ERR_MISSQUOTE = (ERR_GRAMMAR_BASE + 3)
  128. Global Const ERR_MISSLPAREN = (ERR_GRAMMAR_BASE + 4)
  129. Global Const ERR_MISSRPAREN = (ERR_GRAMMAR_BASE + 5)
  130. Global Const ERR_TOODEEP = (ERR_GRAMMAR_BASE + 6)
  131. Global Const ERR_TOOMANYTOKENS = (ERR_GRAMMAR_BASE + 7)
  132. Global Const ERR_BADFORMAT = (ERR_GRAMMAR_BASE + 8)
  133. Global Const ERR_BADVALUE = (ERR_GRAMMAR_BASE + 9)
  134. Global Const ERR_UNMATCHEDTYPE = (ERR_GRAMMAR_BASE + 10)
  135. Global Const ERR_BADBREAKER = (ERR_GRAMMAR_BASE + 11)
  136. Global Const ERR_BADRANGEOP = (ERR_GRAMMAR_BASE + 12)
  137. Global Const ERR_ALL_WILD = (ERR_GRAMMAR_BASE + 13)
  138. Global Const ERR_NON_LAST_WILD = (ERR_GRAMMAR_BASE + 14)
  139. Global Const ERR_WILD_IN_DTYPE = (ERR_GRAMMAR_BASE + 15)
  140.  
  141. Global Const cmdoptNONE = 0
  142. Global Const cmdoptHIDE = 1
  143.  
  144. Global Const GI_MAINHWND = 2                     ' handle of main window
  145. Global Const GI_CURRHWND = 3                     ' handle of active window
  146. Global Const GI_FGCOLOR = 5                      ' foreground color in specified region
  147. Global Const GI_BKCOLOR = 6                      ' background color in specified region
  148. Global Const GI_TOPICNO = 7                      ' current topic in specified region
  149. Global Const GI_HPATH = 8                        ' filename of topic in specified window
  150. Global Const GI_HWNDSRMAIN = 11                  ' handle to main scrolling region
  151. Global Const GI_HWNDNSRMAIN = 13                 ' handle to main nonscrolling region
  152. Global Const GI_TOPADDR = 16                     ' top address in specified region
  153. Global Const GI_BOTADDR = 17                     ' bottom address in specified region
  154.  
  155.  
  156. ' External declarations for APIs in mvapi2.dll.
  157.  
  158. Declare Function VwrFromMVB Lib "mvapi2.dll" (ByVal szMVB As String) As Integer
  159. Declare Function VwrCommand Lib "mvapi2.dll" (ByVal iVwr As Integer, ByVal szMVB As Any, ByVal szMacro As String, ByVal iCmdOptions As Integer) As Integer
  160. Declare Function VwrQuit Lib "mvapi2.dll" (ByVal iVwr As Integer) As Integer
  161. Declare Function HwndFromVwr Lib "mvapi2.dll" (ByVal iVwr As Integer) As Integer
  162. Declare Function VwrFromHwnd Lib "mvapi2.dll" (ByVal hWnd As Integer) As Integer
  163. Declare Function VwrFromHinst Lib "mvapi2.dll" (ByVal hInst As Integer) As Integer
  164. Declare Function VwrGetInfo Lib "mvapi2.dll" (ByVal iVwr As Integer, ByVal iInfoMsg As Integer, ByVal lParam1 As Long, ByVal lParam2 As Long) As Long
  165.  
  166.