home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hitest.exe / HITEST10.EXE / DOC / HITEST10.NSF (.txt) < prev   
Lotus Notes Database  |  1994-06-16  |  786KB  |  4,578 lines

  1. HiTest 1.0 Reference
  2. .0 Reference
  3. C:\NOTES\hitest.nsf
  4. Class$Collation$TITLE$
  5. CN=Scott Prager/O=Edge Research
  6. <    <    L
  7. sJa}R
  8. 7qSJP
  9. tghOl
  10. F9R)"
  11. 4Q!3'$
  12. -Default-
  13. CN=Scott Prager/O=Edge Research
  14. L]P=6>mh
  15. <    ;#C
  16. ,Fl=}
  17. ihA[*
  18. L]P=6>mh
  19. ########################################################
  20. ########################################################
  21. ########################################################
  22. ########################################################
  23. ########################################################
  24. ########################################################
  25. ########################################################
  26. ########################################################
  27. ########################################################
  28. ########################################################
  29. ##########################################################
  30. MainSectionGlossary#############
  31. ########################################################
  32. FunctionsCN=Scott Prager/O=Edge ResearchF
  33. Object
  34. Description
  35. Object
  36. Description of the 
  37. Object"
  38.  object
  39. Summary
  40. ObjectSubject$0$1$Conflict$REF
  41. Object
  42. Function
  43. Comment
  44. Object$0
  45. ObjectObjectSubject$0NameZ
  46. Object
  47. Description
  48. $1Summaryn
  49. Object
  50. Description of the 
  51. Object"
  52.  object
  53. Summary
  54. 534Arial###
  55. FunctionCN=Scott Prager/O=Edge ResearchC    
  56. SeeAlsoExampleReturnsParametersDescriptionSyntaxSummaryNameObject###################################################
  57. CN=Scott Prager/O=Edge Research
  58. """"""" 
  59. """"""" 
  60. DDDDDD
  61. DDDDDD
  62. DDDDDD
  63. ObjectCN=Scott Prager/O=Edge ResearchC
  64. DescriptionObject###########################################
  65. SectionCN=Scott Prager/O=Edge ResearchC
  66. ContentsSectionChapter###########################
  67. All DocumentsCN=Scott Prager/O=Edge Research
  68. Section
  69. Chapter 
  70. Chapter
  71. MainSection
  72. Chapter
  73. Object 
  74. Object"
  75. Section
  76. Section
  77. MainSection
  78. Chapter
  79. Object
  80. Description
  81. Object
  82. Description of the 
  83. Object"
  84.  object
  85. Summary
  86. $1Subject$0$2$Conflict$REF
  87. Section
  88. Chapter 
  89. Chapter
  90. MainSection
  91. Chapter
  92. Object 
  93. Object"
  94. Subject$0Title
  95. Section
  96. Section
  97. MainSection
  98. Chapter
  99. Object
  100. Description
  101. $2Summaryn
  102. Object
  103. Description of the 
  104. Object"
  105.  object
  106. Summary
  107. 534Arial
  108. ########################
  109. GuideCN=Scott Prager/O=Edge Research
  110. Section
  111. Section
  112. Chapter
  113. ChapterSubject$3$Conflict$REF
  114. Section
  115. MainSection
  116. Comment
  117. Chapter$3
  118.  ChapterChapterSubject$3SectionJ
  119. Section
  120. Section
  121. Chapter
  122. 534Arial################################
  123. CN=Scott Prager/O=Edge Research#########################################################
  124. CN=Scott Prager/O=Edge Research#########################################################
  125. CommentCN=Scott Prager/O=Edge Research
  126. BodySubjectDateComposedFrom#####################
  127. MainSectionCN=Scott Prager/O=Edge ResearchC
  128. ContentsChapter########################################
  129. sJa}R
  130. $Modified
  131. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment
  132. $TITLE
  133. #################################
  134. Section1.1  General1.  Overview of HiTest###############################################
  135. Section1.2  Benefits1.  Overview of HiTest##############################################
  136. Section1.  Overview of HiTest1.3  Basic Structure
  137. ###########
  138. Section2.1  Installation2.  Installing HiTest###########################################
  139. Section2.2  Samples2.  Installing HiTest################################################
  140. Section3.1  Requirements3.  Programming to the HiTest API###############################
  141. ##########################################################
  142. ##########################################################
  143. ##########################################################
  144. Section3.3  Data Types3.  Programming to the HiTest API#################################
  145. Section3.  Programming to the HiTest API3.4  Context
  146. ########
  147. Section3.5  Error Handling3.  Programming to the HiTest API#############################
  148. Section3.6  Mixing HiTest with the standard Notes API3.  Programming to the HiTest API##
  149. Section4.1  Overview4.  HiTest Functions################################################
  150. Object(Global)##################
  151. ObjectAddin#####################
  152. FunctionhtConvertConverts data between data types.
  153. Converts data between HiTest data types. HiTest writes the converted data into a supplied buffer, and optionally returns the new length. HiTest supports conversion between any data types, with two exceptions. First, HiTest cannot convert between any numeric type (INT, NUMBER, NUMBER_LIST) and any datetime type (DATETIME, TIME_LIST). Second, the only valid conversion involving COMPOSITE is to and from TEXT.HTSTATUS return code. Failures include:
  154.         HTFAIL_INVALID_CONVERT (source type does not convert to destination type);
  155.         HTFAIL_OVERFLOW (destination buffer is too small);
  156.         HTFAIL_BAD_FORMAT (source data conversion to destination type failed).HTSTATUS status;
  157.         HTINT newlen;
  158.         HTDATETIME date;
  159.         status = htConvert (HTTYPE_TEXT, 0, "Jan 29, 1966",
  160.                                   HTTYPE_DATETIME, sizeof (HTDATETIME),
  161.                                   &date, &newlen);htConvertLength, htSetOption(Global)
  162. ##########################################################
  163. FunctionhtConvertLengthReturns the length of data converted as indicated.
  164. Determines the length of data resulting from the indicated conversion. Used to determine the buffer length needed when converting to a variable length type. See the htConvert description for a list of invalid conversions.HTINT length of result data. Returns zero for an invalid or illegal conversion.char *string = NULL;
  165.         HTINT length;
  166.         double number = 3.456;
  167.         HTSTATUS htstatus;
  168.         length = htConvertLength (HTTYPE_NUMBER, 0, &number,
  169.                                           HTTYPE_TEXT);
  170.         if (length != 0)
  171.         {
  172.             string = malloc (length + 1);
  173.             status = htConvert (HTTYPE_NUMBER, 0, &number,
  174.                                         HTTYPE_TEXT, length, string, NULL);
  175.         }htConvert(Global)#########################################
  176. FunctionhtGetEnvStringRetrieves the value of a Notes environment string variable.
  177. Retrieves the value of a Notes environment string variable. Notes stores environment variables in the NOTES.INI file. Use the htSetEnvString function to modify Notes environment variables. To retrieve import/export formats, which are stored in multiple environment variables, use the functions htCompImportList and htCompExportList.HTSTATUS return code. Failures include:
  178.         HTFAIL_DATA_UNAVAIL (no such environment string).char env_string [HTLEN_ENV_STRING + 1];
  179.         HTSTATUS status;
  180.         status = htGetEnvString ("VARNAME", 0, env_string);htSetEnvString, htCompImportList, htCompExportList(Global)##################################################
  181. FunctionhtGetInfoObtains a piece of process-level information.
  182. Fetches one of various process-level information items into a supplied buffer. Each item has a data type, and the buffer must be large enough to hold the result.HTSTATUS return code. Failures include:
  183.         HTFAIL_ILLEGAL_ENUM (invalid item).char username [HTLEN_USERNAME + 1];
  184.         HTSTATUS status;
  185.         status = htGetInfo (HTGLOBINFO_USERNAME, username);htInit(Global)##############################################
  186. FunctionhtInitInitializes the HiTest API.
  187. For each process or task which uses HiTest functions, htInit must be the first HiTest function called. Any other function called before htInit will fail. Note that it is crucial that every HiTest API program invoke both htInit to start and htTerm when complete.HTSTATUS return code. Failures include:
  188.         HTFAIL_ALREADY_INIT (htInit already called);
  189.         HTFAIL_INCORRECT_DLL (program compiled with an incompatible HiTest version).HTSTATUS status;
  190.         status = htInit ();htTerm(Global)#############
  191. FunctionhtSetEnvStringAssigns the value of a Notes environment string variable.
  192. Assigns a value to a Notes environment string variable. The calling program controls whether to create a new environment variable and whether to overwrite an existing one. Notes stores environment variables in the NOTES.INI file. Use the htGetEnvString function to retrieve Notes environment variables. Use care when modifying Notes environment variables, since they affect the Notes client and server programs.HTSTATUS return code. Failures include:
  193.         HTFAIL_DUPLICATE (name exists and overwrite is FALSE);
  194.         HTFAIL_DATA_UNAVAIL (name does not exist and create is FALSE);
  195.         HTFAIL_OVERFLOW (value is longer than the maximum environment string length).HTSTATUS status;
  196.         status = htSetEnvString ("VARNAME", "Variable Value", TRUE,
  197.                                          FALSE);htGetEnvString(Global)##############################
  198. ObjectCell######################
  199. ObjectColumn####################
  200. ObjectComposite#################
  201. ##########################################################
  202. HTSTATUS htInit (void);?
  203. HTSTATUS htTerm (void);?
  204. ChapterSectionContents
  205. "Arial
  206. Times New Roman
  207. 1Courier New
  208. Object: 
  209. Object
  210. Summary
  211. ---------------------------------------------------------------------------------------------------------------------------------------------------
  212.         Syntax:e
  213. Syntax
  214. Description:
  215. Description
  216. Parameters:
  217. Parameters
  218.       Returns:
  219. Returns`
  220.     Example:    
  221. Example
  222.    See Also:
  223. SeeAlso
  224. "Arial
  225. Times New Roman
  226. Object: 
  227. Object
  228. --------------------------------------------------------------------------------------------------------------------------------------------------- 
  229. Description
  230. "Arial
  231. Times New Roman
  232. Chapter 
  233. Chapter
  234. Section
  235. Sectioni
  236. ---------------------------------------------------------------------------------------------------------------------------------------------------
  237. Contents
  238. About HiTest 1.0 Reference
  239. $$U$$
  240. $IU$I
  241. $mU$m
  242. I$UI$
  243. IIUII
  244. ImUIm
  245. m$Um$
  246. mIUmI
  247. mmUmm
  248. copyright
  249. HiTest
  250. Enhanced Lotus Notes API
  251. Release 1.0
  252. Edge Research Inc.
  253. One Harbour Place, Suite 455
  254. Portsmouth, NH 03801
  255. (USA)e
  256. Phone: (603) 431-5300g
  257. FAX: (603) 427-2541e
  258. Copyrights
  259. Copyright 1994, Edge Research Inc.  All rights reserved.
  260. Neither the documentation nor the software may be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form, in whole or in part, without the prior written consent of Edge Research Inc., except in the manner described in the license.m
  261. Trademarks
  262. HiTest, htGLUE, and htVISUAL are trademarks of Edge Research Inc.U
  263. Lotus Notes is a registered trademark of Lotus Development Corporation.m
  264. OS/2 is a trademark of International Business Machines Corp.
  265. Microsoft is a registered trademark, and Windows, Word for Windows, 
  266. and Visual Basic
  267.  are trademarks, of Microsoft Corporation.
  268. All other trademarks are property of their respective owners.
  269. Disclaimer
  270. The information in this database is subject to change and does not represent a commitment on the part of Edge Research Inc.
  271. The sample programs are not warranted to perform any function other than providing a simple demo
  272. stration of how to make a particular API call in a program context.
  273. Using HiTest 1.0 Reference
  274. $$U$$
  275. $IU$I
  276. $mU$m
  277. I$UI$
  278. IIUII
  279. ImUIm
  280. m$Um$
  281. mIUmI
  282. mmUmm
  283. copyright
  284. HiTest
  285. Enhanced Lotus Notes API
  286. Release 1.0`
  287. This database is the online reference for the HiTest API. This reference contains the information from the HiTest API documentation file.
  288. Full-Text Index
  289. In addition to using the views built into this database, we strongly encourage you also to create and use a full-text index for the database. Doing so will require about 300K of extra disk space, but will allow you to very quickly find the information you need.0
  290. Changing the Information in the Database
  291. a comment to the database...
  292. 1) In a view, highlight the item you want to add a comment to.
  293. 2) Pull down the Compose menu.
  294. 3) Choose the "Comment" form. 
  295. nV$DesignVersion$Version$Formula$FormulaClass$Collation$TITLE$Index$UpdatedBy$ViewFormat$Fonts$Info$WindowTitle$FlagsObjectNameSummarySyntaxDescriptionParametersReturnsExampleSeeAlso$Fields$BodyIconBitmapChapterSectionContentsFromDateComposedSubjectBody$Collection$ViewContainerForm$Revisions
  296. UseSubject
  297. Subject
  298. ImmediateParentSubjecth
  299. ImmediateParentSubject
  300. Subject
  301. StandardTitle
  302. Response to "
  303. UseSubject"
  304. StandardTitle
  305. StandardTitle
  306. Comment    
  307. Author:
  308. FromAuthor of this document
  309.             
  310. Date Composed:  
  311. DateComposedDate this document was composed
  312. Subject:    
  313. Trimmed
  314. Subject
  315. Trimmed
  316. Trimmed
  317. SubjectEnter an optional word or phrase describing your response.
  318. Your Comment                                                                                      
  319. BodyEnter the text of your response.
  320. "Arial
  321. Times New Roman
  322. Chapter
  323. ---------------------------------------------------------------------------------------------------------------------------------------------------
  324. Contents
  325. A basic HiTest API program involves reading and writing Notes data. The flowcharts on the following pages show basic program flow including opening a cursor, producing an index (result set), reading and writing data, and closing the connection.
  326. $Modified
  327. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$C1$
  328. $TITLE
  329. Functions
  330. Function
  331. Object    
  332. Section
  333. All Documents
  334. Guide    
  335. Comment
  336. MainSection#########
  337. ##########################################################
  338. ##########################################################
  339. MainSectionCN=Scott Prag$DesignVersion
  340. sJa}R
  341. Chapter 3.  Programming to the HiTest API
  342. Chapter 3.  Programming to the HiTest API
  343. Chapter 3.  Programming to the HiTest API
  344. Chapter 3.  Programming to the HiTest API
  345. Chapter 3.  Programming to the HiTest API
  346. Chapter 3.  Programming to the HiTest API
  347. Description of the (Global) object
  348. Converts data between data types.
  349. Returns the length of data converted as indicated.
  350. Retrieves the value of a Notes environment string variable.
  351. Obtains a piece of process-level information.
  352. Assigns the value of a Notes environment string variable.
  353. Assigns the value of a global option.
  354. Polls for scheduling interval events.
  355. Logs an event in the Notes log and to the Notes server console.
  356. 7qSJP
  357. Sets a Notes server console task status line.
  358. Yields processor control for a specified period.
  359. Binds a cell column to a program variable.
  360. Converts and retrieves the data for a cell into a supplied buffer.
  361. Obtains the length of a cell as converted to a specified data type.
  362. Removes the binding of a cell column.
  363. Obtains the number of columns in a view.
  364. Iterates through columns in a view.
  365. Description of the Datetime object
  366. Relatively compares two datetimes.
  367. Creates a datetime from individual components.
  368. Absolutely compares two datetimes.
  369. Obtains a piece of information from and about a datetime.
  370. Modifies a datetime to produce a new datetime.
  371. Description of the Document object
  372. Closes an open document, optionally discarding all changes.
  373. Copies a document, and optionally its hierarchy, between cursors.
  374. Deletes a document, and optionally its hierarchy.
  375. Opens the next document in the active index, and loads all bound data.
  376. Obtains a piece of information from and about an open document.
  377. Opens a document for data access or modification.
  378. Creates a new document from bound items.
  379. Updates modifications to bound items back to the last fetched document.
  380. Obtains the current error information.
  381. Sets writeback buffers to receive error information on any HiTest error.
  382. Assigns an error callback function.
  383. Obtains the number of fields in a form.
  384. 4Q!3'$
  385. Obtains a piece of information about a form field.
  386. Iterates through fields in a form.
  387.  active index, and loads all bound data.
  388. Obtains a piece of information from and about an open document.
  389. Iterates through columns in a view.
  390. Section
  391. Chapter 
  392. Chapter
  393. MainSection
  394. Chapter
  395. Object 
  396. Object"
  397. Section
  398. Section
  399. MainSection
  400. Chapter
  401. Object
  402. Description
  403. Object
  404. Description of the 
  405. Object"
  406.  object
  407. Summary
  408. $1Subject$0$2$Conflict$REF$C1$
  409. All DocumentsCN=Scott Prager/O=Edge Research
  410. Section
  411. Chapter 
  412. Chapter
  413. MainSection
  414. Chapter
  415. Object 
  416. Object"
  417. Section
  418. Section
  419. MainSection
  420. Chapter
  421. Object
  422. Description
  423. Object
  424. Descript
  425. The HiTest API (Application Programming Interface) is an alternative higher level C interface to the API provided by Lotus for Lotus Notes. Program development is significantly faster and requires a fraction of the API code needed with the standard API. 
  426. HiTest API programmers should have some familiarity with C programming. Also useful is some familiarity with either Lotus Notes or the standard Lotus Notes API. The glossary defines terms related to Lotus Notes and the HiTest API.
  427. This manual is organized into the following chapters:?
  428. 1.    Overview of the HiTest API?
  429. 2.    Instructions and requirements for installing HiTest
  430. 3.    Instructions for building HiTest API applications
  431. 4.    HiTest function descriptions?
  432. Some of the major benefits of the HiTest API are:?
  433.     Protective API layer catches invalid handles and operations which, under the standard API, cause crashes.?
  434.     Simple browsing functions for everything from servers and databases through attachments and items.
  435.     Abstraction of metadata (forms and views) for quick, single function access to form and view information. Additional field and column browsing functions let developers avoid completely the internal Notes BLOBs containing the metadata.
  436.     Simple data transfer -- by binding document items and view cells, a single function call will load, store, or update multiple items and cells.
  437.     Automatic data conversion implicitly when fetching or storing data, or explicitly with a single conversion function.
  438.     Internal handling of components that are cumbersome in the standard Notes API, such as ID tables, collections, memory blocks, and composite data.?
  439.     Simple high-level creation, access, and manipulation of composite data (including single-function import and export) far above the standard API's byte level with composite data functions.?
  440.     Integrated single-function support for macro execution and full text search.
  441.     Support for server or client add-in programs with a built-in scheduler.?
  442.     Remote server console support lets clients control server activities such as replication and program execution.?
  443.     Automatic management of response hierarchies, including the ability to copy or delete an entire hierarchy of unlimited breadth and depth with a single function call, as well as easy creation and management of responses.?
  444.     Advanced mail interface for sending mail from a structure, from an existing document, from bound memory, or from any combination with a single function call.?
  445.     Three error handling methods so developers can use the method with which they are most comfortable.?
  446.     High-level object-based HiTest API facilitates rapid program development.?
  447. HiTest offers a consistent interface to the various components of Lotus Notes. The highest level of abstraction is the set of HiTest objects, covering the various components of Lotus Notes. The following diagram shows the object containment hierarchy:?
  448. The object-based design of HiTest has two major usability benefits. First, abstraction of  objects that the standard API simply considers data (form, field, view, column, macro, cell, file, and composite) often lets single function calls replace medium-sized functions. Second, HiTest was designed as a consistent high-level Notes interface, rather than a collection of low-level internal functions. Common actions, such as iterating through an object, are done through common interfaces (e.g., most objects contain a List function, which works similarly across objects).?
  449. The HiTest API is built over the standard Notes API. Therefore, any machine used to build or run programs with HiTest must have a licensed copy of  the Lotus Notes software (client or server, version 3.0 or higher). In addition, the machine must satisfy the hardware and software requirements to run the Lotus Notes software.?
  450. The HiTest API consists of the following files:?
  451.     HTNOTES.H        Include in all programs calling HiTest
  452.     HTxNOTES.LIB        Import library for the HiTest DLL
  453.     HTxNOTES.DLL    HiTest DLL - required to run HiTest programs
  454. The import library and DLL filenames contain an 'x', which varies with the operating system. The x is replaced with 'W' for Windows 3.1, 'O' for OS/2 1.3 (16-bit), and 2 for OS/2 2.x (32-bit).
  455. The HiTest API is installed from a ZIP file. First, create a HiTest API directory (e.g., C:\HITEST) and copy the file into this directory. Next, unzip the ZIP file from either a DOS window or an OS/2 window with the HiTest directory as the current directory. Use the ?
  456.  option when unzipping to extract the subdirectories as well as the files. The installation process creates the following directories and files under the HiTest installation directory:
  457. INCLUDE directory?
  458.     HTNOTES.H    ?
  459.         HiTest API include file?
  460. LIB directory?
  461.     HTWNOTES.LIB?
  462.         Windows 3.1 import library
  463.     HTONOTES.LIB?
  464.         OS/2 1.3 16-bit import library
  465.     HT2NOTES.LIB?
  466.             OS/2 2.x 32-bit import library?
  467. DLL directory?
  468.     HTWNOTES.DLL?
  469.         Windows 3.1 DLL?
  470.     HTONOTES.DLL?
  471.         OS/2 1.3 16-bit DLL?
  472.     HT2NOTES.DLL?
  473.         OS/2 2.x 32-bit DLL?
  474. SAMPLES directory?
  475.             Sample programs in subdirectories
  476.     ...                Each subdirectory contains one sample program?
  477. DOC directory?
  478.     HITEST.RTF            
  479. Microsoft RTF format HiTest reference manual
  480.     HITEST?
  481. .NSF            ?
  482. Notes database format HiTest reference manual?
  483.                         
  484.  represents the version number
  485.                         (e.g., HITEST10.NSF for HiTest v1.0)
  486. Next, modify the INCLUDE and LIB environment variables needed by the compiler to find the HiTest files. Add the HiTest INCLUDE directory to the INCLUDE environment variable for the compiler to find the HTNOTES.H include file. Add the HiTest LIB directory to the LIB environment variable for the linker to find the proper import library. To run HiTest API programs, the HiTest DLL must be available to the operating system. For Windows, the DLL is usually placed in the WINDOWS\SYSTEM directory, but may be in the WINDOWS directory or elsewhere in the PATH. For OS/2, the DLL should be in a directory in the LIBPATH environment variable.
  487. To run HiTest API programs, the NOTES.INI file must be available in a directory in the PATH environment variable. Most Notes installations locate this file in either the Windows or Notes program directory, in which case it should already be in the PATH. Some installations, though, locate this file in the Notes data directory. If this is the case, then add this directory (or another directory if NOTES.INI is elsewhere) to the PATH if not already included.
  488. The HiTest installation includes various sample programs. These programs demonstrate common activities performed with the HiTest API. One subdirectory under the SAMPLES directory exists for each sample program. Each sample program includes the following files:
  489.     README.TXT        describes the sample program?
  490.     MAKEFILE        builds the sample program. Invoke with an operating system constant
  491.                 (e.g.: NMAKE WIN, NMAKE OS21, or NMAKE OS22).?
  492.     HTSAMPLE.H        generic sample program header file?
  493. PROGRAM?
  494. .C        sample program-specific source code?
  495. PROGRAM?
  496. .H        optional sample program header file?
  497. Build and run the sample program SIMPLE to test for proper installation of HiTest. The other sample programs are described below:?
  498. Program?
  499. Description?
  500. DBMETA
  501. Demonstrates database and metadata access by connecting to a database and generating all metadata for the database to a file.?
  502. VIEWDMP?
  503. Demonstrates creation and navigation of a view-based index and its cell data. The view is rendered without formatting to a file.
  504. DOCITEM?
  505. Demonstrates document item access by item binding and by direct item access. The item data for all documents in a flat index is written to a file.
  506. DOC2NSF?
  507. Converts and parses the HiTest documentation into a Notes database. The documentation is imported into a composite item, which is then parsed to produce one Notes document for each function in the HiTest API. This sample is a detailed example of creation and manipulation of composite data.
  508. This section contains requirements and instructions for writing HiTest API programs.
  509. The different HiTest platforms support different compilers. Building Windows 3.1 programs requires the Microsoft C compiler version 7.0 or greater. Building OS/2 1.3 16-bit programs requires the Microsoft C compiler version 6.0 (the last version which supported OS/2). Building OS/2 2.x 32-bit programs requires the IBM C Set++ compiler, as well as certain compiler options to interact properly with the 16-bit Notes code beneath HiTest. The options are /Gt (tiled memory to avoid crossing 64K boundaries) and /Sp1 (1-byte structure packing). The /Gs option (remove stack probes) is not required, but is recommended. Programs which call the HiTest API must be compiled as large memory model programs (on 16-bit platforms where memory model is relevant). The minimum stack size for HiTest API programs is 10K (15K for OS/2 2.x), and programs of moderate size or complexity should increase the stack size beyond 10K.
  510. The following table summarizes requirements by platform:
  511. Platform
  512. Requirements
  513. Windows 3.1?
  514. Microsoft C compiler version 7.0 or greater?
  515. large memory model (compiler option /AL)
  516. 10K or greater stack
  517. OS_WIN compilation constant?
  518. OS/2 1.3 (16-bit)?
  519. Microsoft C compiler version 6.0
  520. large memory model (compiler option /AL)
  521. 10K or greater stack
  522. OS_OS21 compilation constant
  523. OS/2 2.x (32-bit)?
  524. IBM C Set++ compiler
  525. 15K or greater stack
  526. OS_OS22 compilation constant
  527. Compiler options /Gt and /Sp1?
  528. (The use of compiler option /Gs is recommended)?
  529. When building a program, to set the stack size in a module definition file use the following statement:?
  530.     STACKSIZE 10240
  531. To set the stack size on the linker command line use the following link option:?
  532.     /ST:10240
  533. Increase the value for larger programs.?
  534. All source code modules using HiTest must declare an operating system before including the HTNOTES.H include file. Define one of the OS constants OS_WIN, OS_OS21, or OS_OS22. To define the constant from within a C program, use the following statement:?
  535.     #define OS_WIN?
  536. To define the constant during compilation, use the following compilation option:
  537.     /DOS_WIN?
  538. The compilation option supports multiple compilations of the same program with different OS constants to run under multiple operating systems.
  539. Every HiTest API program must initialize and terminate the HiTest API. All other HiTest functions will fail unless preceded by a call to the initialization function htInit. Additionally, the program ?
  540.  call the htTerm function after all HiTest function calls are complete and before the program terminates. Calling the termination function is crucial to avoid leaving the system in a dangerous state.?
  541. This section describes the HiTest API data types. Standard Notes data comes in three flavors:?
  542. 1.    Single value data types (NUMBER, TEXT, and DATETIME) contain a single data value (e.g., 3.14).?
  543. 2.    Multiple value data types (TEXT LIST, NUMBER LIST, and TIME LIST) contain one or more values of similar types (e.g., ABC, DEF is a two-element text list). For number or time lists, each individual value is either an exact value or a two-value range (e.g., 3, 5, 7-10 is a three-element number list, where the third element is a range).
  544. 3.    Composite data type (COMPOSITE) is a collection of individual composite records of different subtypes. Composite data may contain multiple record types, including formatted text, images, links, etc. For a full description of composite record types, see the composite record section in the function descriptions.
  545. HiTest supports all the standard Notes data types. In addition, HiTest supports a special data type (REF) which is a responses reference to a parent document. The constant HTLEN_ITEM_DATA defines the maximum data length for all types except composite. Composite data may be of unlimited length.
  546. The following table describes the data types, with internal formats and any notes. The constant representing each datatype is constructed by prefixing HTTYPE_ (e.g., HTTYPE_INT).
  547. Standard types
  548. Description?
  549. C long integer. Although Notes stores all numbers as double-precision floating-point values, many numeric items represent integer values. In these cases it is convenient to use the integer type, which HiTest automatically converts to and from the Notes internal number format.
  550. NUMBER
  551. C double precision floating-point. This is the type used by Notes to store all numeric values. The constant HTLEN_NUMBER_TEXT defines the maximum length of a NUMBER converted to text.?
  552. Variable length text string. Although Notes stores text without null terminators, 
  553. all text values transferred  to and from the HiTest API use a NULL terminator?
  554. . It is crucial that all text buffers allow an extra byte for the NULL terminator. The terminator is not included in the text length (e.g., the length of ABCDE is five bytes, but a buffer supplied by the calling program must be six bytes). This is true not only for data, but for informational items (e.g., server names, error messages, etc.). The exception is functions that retrieve direct data pointers (GetPtr functions), where text values may not contain a NULL terminator. Handle these values by length rather than with standard C string functions.
  555. DATETIME
  556. 8-byte data object representing a date and time. Use the htDatetime functions to manipulate datetime values (do not directly manipulate the datetime data). The HiTest representation is the same as the standard Notes API representation. The range is from year 1 through year 32767, and the precision is one-hundredth of a second. Datetime values are time zone specific. The constant HTLEN_DATETIME_TEXT defines the maximum length of a DATETIME converted to TEXT.?
  557. TEXT_LIST?
  558. A multiple-value collection of zero or more text strings. Use the htTextList functions for easy access to the contents of a text list. The text values within a text list are not NULL terminated. The format of a text list containing N entries is:?
  559. WORD     number of entries (N)
  560. WORD     length of entry #1?
  561. WORD     length of entry #2?
  562. WORD     length of entry #N?
  563. text           text of entry #1?
  564. text           text of entry #2?
  565. text           text of entry #N?
  566. NUMBER_LIST?
  567. A multiple-value collection of zero or more C double-precision floating-point values and ranges. The format of a number list containing N values and M ranges is:?
  568. WORD     number of values (N)?
  569. WORD     number of ranges (M)?
  570. double      value #1
  571. double      value #2
  572. double      value #N
  573. double      low value of range #1?
  574. double      high value of range #1
  575. double      low value of range #M?
  576. double      high value of range #M
  577. TIME_LIST?
  578. A multiple-value collection of zero or more DATETIME values and ranges. The format of a time list is the same as a number list, with HTDATETIME values in place of doubles.?
  579. COMPOSITE?
  580. A composite is an ordered list of composite records. Each composite record is of a type within the HTCOMP_xxx enumeration. Unlike other Notes types stored as a single document item, a composite may consist of multiple items. One of the benefits of the HiTest API is the abstraction of a composite object as a single object regardless of the number of document items in that composite. For more information, see the htComp and htComprec function descriptions.
  581. Nonstandard types?
  582. Description?
  583. The HiTest representation of a reference to a parent document. Notes stores response information within the child as a reference to the parent. Reference items are always of the same item name -- $REF (use the constant HTNAME_REF). In HiTest, a reference items value is the HTDOCID of the parent document (internally, Notes uses a more complex representation). Forms do not contain reference fields, so reference items are handled independently of strict binding and form fields.?
  584. HiTest supports implicit and explicit data conversion between types. Use the htConvert function to perform explicit conversion. Implicit conversion occurs in functions which fetch or put data (htDocFetch, htDocPut, htDocUpdate, htItemFetch, htItemGetPtr, htItemPut, htCellFetch). While HiTest supports most conversions, certain conversions do not make sense and are invalid. No conversions between numeric (INT, NUMBER, and NUMBER LIST) and time (DATETIME and TIME LIST) are allowed. Additionally, COMPOSITE can only be converted to and from TEXT. REF cannot be converted. If an unsupported conversion is required, perform two conversions, using type TEXT as the intermediary (e.g., convert from type X to TEXT, and then from TEXT to type Y). Certain conversions may result in a loss of information (e.g., converting a composite item to text will retain only ASCII text information).?
  585. Objects within the HiTest API are represented by either an identifier or a handle. Simple objects need only an identifier. An identifiers type depends on the object. For example, a servers identifier is a string, a documents identifier is an ID, and a view columns identifier is a number. Larger or more complex objects must be opened and closed and require a handle. Cursors, documents, and composite items use handles. Certain actions on objects are only valid within the context of other objects. The simplest example is that of an open document. Closing a cursor containing an open document closes the document and invalidates its handle.
  586. A cursor represents a single HiTest session. Each process or task can contain multiple cursors at any point in time. Multiple cursors may be open to a single database. All actions performed against a database occur through a cursor. A cursor contains a state which consists of an active form, an active view, an index, bindings, and open documents. Any operation which cancels or replaces part of a cursors state destroys the previous value. For example, producing a new index destroys the previous index.?
  587. The following table lists the HiTest functional contexts in a simplified state transition table. Each context lists objects and functions which are valid from within that context (an object name indicates that all functions of that object are valid in the context). The context ordering is from highest level to lowest. When entering a lower context from a higher context, all functions in the previous context are still valid . For example, after entering the ?
  588. Open Composite
  589.  context from the 
  590. Open Document?
  591.  context, the htItemPut function is still valid even though it is not listed in the 
  592. Open Composite
  593. . Each context also lists those functions which cause a transition to a different context. When entering a lower context from a higher context, all transitions in the previous context are still valid. For example, performing htCurClose from the ?
  594. Open Document?
  595.  context causes a return to the 
  596. Initialized?
  597.  context. Multiple contexts may exist simultaneously. For example, calling htDocCreate when in the ?
  598. Fetched Document
  599.  context will create a valid ?
  600. Open Document?
  601.  context. These document contexts may operate independently, but a call to htCurClose would close them both by closing their parent context.
  602. Context?
  603. Valid?
  604. Transitions?
  605. Uninitialized?
  606. htInit (Initialized)
  607. Initialized?
  608. Global, Addin, Server, Database, TextList, Datetime, Error
  609. htCurOpen (Open Cursor)?
  610. htTerm (Uninitialized)
  611. Open Cursor?
  612. Cursor, Form, View, Field, Column, Macro, Formula, Mail?
  613. htCurClose (Initialized)
  614. htItemBind (Bound Item)?
  615. htFormulaExec (Active Index)
  616. htDocOpen, htDocCreate (Open Document)
  617. Bound Item
  618. htDocPut
  619. htCurReset (Open Cursor),?
  620. htFormulaExec (Active Index)
  621. Active Index
  622. Index, Cell*
  623. htCurReset (Open Cursor)
  624. htCellBind* (Active Index/Bound Cell)?
  625. htItemBind (Active Index/Bound Item)
  626. Active Index / Bound Cell?
  627. htDocFetch
  628. htCurReset (Open Cursor)
  629. htIndexSearch, htFormulaExec (Active Index)?
  630. htItemBind (Active Index/Bound Item)
  631. Active Index / Bound Item?
  632. htDocPut
  633. htIndexSearch, htFormulaExec (Active Index)?
  634. htDocFetch (Fetched Document)?
  635. Open Document?
  636. Document, Item, File
  637. htDocClose (Open Cursor),?
  638. htItemFetch/htItemGetPtr to type HTTYPE_COMPOSITE?
  639.                 (Open Composite)
  640. htCompImport, htCompCreate (Open Composite)?
  641. Fetched Document
  642. Document, Item, File, htDocUpdate?
  643. htDocClose (Active Index/Bound Item)
  644. htIndexNavigate, htIndexSetPos, htIndexSetTreePos?
  645.                 (Active Index/Bound Item)?
  646. htIndexSearch, htFormulaExec (Active Index)?
  647. htItemFetch/htItemGetPtr to type HTTYPE_COMPOSITE?
  648.                 (Open Composite)
  649. htCompImport, htCompCreate (Open Composite)?
  650. Open Composite
  651. Composite, Comprecord?
  652. * Cell functions are only valid in view-based indices.
  653. Context Transition Table
  654. In HiTest, higher contexts contain lower contexts. The following diagram shows context containment.?
  655. Context Containment Diagram?
  656. Program context affects the method of data access. Often data is accessible with either a Fetch operation or a GetPtr operation. The Fetch operation transfers data to a buffer supplied by the calling program. When the data source becomes invalid (e.g., by closing the document), this data is still valid since it is a copy into memory managed by the calling program. The GetPtr operation simply returns a pointer to memory managed by HiTest. The GetPtr operation is more efficient than the Fetch operation when retrieving the same data value repeatedly. When the data source becomes invalid in this case, the data pointer becomes invalid. The calling program can no longer access the data, and should not free the data pointer itself since HiTest manages the memory.
  657. The HiTest API supports three styles of error handling, so developers can implement error handling in the manner with which they are most familiar and comfortable. HiTest handles errors on a process level (i.e., errors in multiple cursors in a single process are stored in a single location). When an error occurs, there are three pieces of information available: the error code, the error severity, and the error string. The next HiTest API call automatically clears error information (except htError functions, which do not affect the current error information). For more detail on error functions, see the htError function descriptions.?
  658. The first style of error handling is the most basic. Most HiTest functions return an HTSTATUS value representing the error code. When this value indicates an error condition, use the htErrorFetch function to get more error information. Error return values are easily checked by comparing them against zero since successful operation (HTSUCCESS) is always equal to zero, and nonzero indicates an error condition.?
  659. The second style of error handling involves assigning writeback buffers with htErrorSetBuffer. The calling program assigns buffers to receive one or more of the error code, severity, and string when an error occurs. Just before returning, each HiTest function checks for an error condition and automatically writes any error information to the error buffers. Return values may still be used to check status.?
  660. The third style of error handling assigns a callback function with htErrorSetProc. The calling program defines a callback function to be called by HiTest when an error occurs. Declare this function to match the HTERRORPROC type. When invoked, the callback function receives as input parameters the error code, error severity, and error string pointer. In addition, HiTest passes a parameter, supplied by the calling program to htErrorSetProc, to the callback function. This supplies access to information and context from the calling program within the callback function. HiTest functions call the callback function as the last action before returning an error code. If a program uses both this method and writeback buffers (they are usually used exclusively), HiTest writes to the writeback buffers before calling the callback function. Return values may still be used to check status.
  661. A summary of HiTest errors and severities follows:
  662. Class?
  663. Error constant
  664. Description?
  665. General?
  666. htfail_notes_error
  667. Standard Notes API error
  668. htfail_program
  669. Software error -- contact Edge Research technical support?
  670. htfail_illegal_enum?
  671. An enumeration parameter value is invalid?
  672. htfail_null_parameter?
  673. A parameter is NULL when a value is required
  674. htfail_overflow?
  675. A data value cannot fit in the supplied buffer
  676. htfail_duplicate
  677. Name is already in use
  678. htfail_bad_format?
  679. A parameter value is formatted incorrectly
  680. htfail_end_of_data
  681. The last data value has been retrieved
  682. htfail_data_unavail?
  683. Requested data is unavailable?
  684. Global
  685. htfail_incorrect_dll
  686. Program compiled with an incompatible version of HiTest?
  687. htfail_already_init?
  688. htInit called when HiTest is already initialized
  689. htfail_not_init?
  690. HiTest function other than htInit called when not initialized?
  691. htfail_invalid_convert
  692. The requested conversion is not legal?
  693. htfail_invalid_database?
  694. No such database exists?
  695. Cursor
  696. htfail_invalid_cursor?
  697. The cursor is invalid?
  698. htfail_open_documents?
  699. htCurClose called without force and documents are open
  700. htfail_active_result
  701. An active result prevents the requested operation?
  702. htfail_invalid_form?
  703. No such form exists in the database?
  704. htfail_form_unavail?
  705. Strict binding is on, but no active form is set?
  706. htfail_invalid_view?
  707. No such view exists in the database?
  708. Field?
  709. htfail_invalid_field
  710. No such field exists in the form
  711. Column
  712. htfail_invalid_column?
  713. No such column exists in the view?
  714. Macro?
  715. htfail_invalid_macro
  716. No such macro exists in the database
  717. Formula?
  718. htfail_invalid_formula
  719. The formula is invalid
  720. Index?
  721. htfail_invalid_navtype
  722. View-style navigation attempted on a flat (non-view) index
  723. htfail_invalid_document?
  724. The document handle or ID is invalid
  725. htfail_invalid_item?
  726. No such item exists in the document?
  727. htfail_invalid_directory
  728. No such directory exists
  729. htfail_invalid_file_item
  730. No such file attachment exists in the document
  731. htfail_invalid_composite
  732. Invalid composite handle
  733. htfail_invalid_impexp?
  734. No such import/export format exists?
  735. htfail_invalid_font?
  736. No such font exists in the document font table
  737. Severity
  738. Description?
  739. HTSEVERITY_NOERROR
  740. No error
  741. HTSEVERITY_WARNING
  742. Warning-level error?
  743. HTSEVERITY_NONFATAL?
  744. Normal error
  745. HTSEVERITY_USAGE
  746. Error in calling program's usage
  747. HTSEVERITY_FATAL
  748. Fatal error?
  749. HTSEVERITY_PROGRAM
  750. Internal software error - contact Edge Research?
  751. The HiTest API is sufficient to perform the vast majority of Notes API programming. There are two situations, though, where a program needs some mixture of standard Notes API code and HiTest API code. The first occurs when migrating or expanding a program written against the standard Notes API to HiTest. The second occurs when an API program needs some of the more esoteric Notes API functionality not available with HiTest, such as user registration. In either case, the mixture is straightforward as long as a few guidelines are followed:
  752. 1.    Replace NotesInit and NotesTerm calls with htInit and htTerm calls. These calls include embedded NotesInit and NotesTerm calls.
  753. 2.    Obtain the standard Notes API database or document handle for a HiTest cursor or document with the GetInfo functions (i.e., htCurGetInfo or htDocGetInfo). With the Notes API handle programs can use the standard Notes API to manipulate an object opened with HiTest.?
  754. 3.    Use care when manipulating the same object (database, document, etc.) with both APIs. For example, a document opened in HiTest can be manipulated through the standard Notes API by obtaining the NOTEHANDLE with htDocGetInfo. Using the standard Notes API to append an item is legal, but using the standard API to delete the document is not legal.?
  755. The HiTest API divides functions into functional groupings by object. The actions to perform are verbs and are generally consistent between objects. Each function name consists of four parts, describing the function with an object, a verb, and an optional modifier. The first part is always the prefix ht. The second part is the object name. Functions in the global grouping omit this part. The third part is the verb. The fourth part, only sometimes used, is the modifier. Taking htDocGetInfo as an example, the object is Doc, the verb is Get, and the modifier is Info.
  756. The following summary tables describe the objects and verbs with modifiers.?
  757. Objects?
  758. Verbs used with modifiers?
  759. (Global)
  760. Init, Term, SetOption, GetInfo, GetEnvString, SetEnvString, ConvertLength, Convert
  761. Addin?
  762. SetStatus, PutMsg, SetInterval, GetInterval, Yield
  763. Server
  764. List, GetInfo, Exec?
  765. Database
  766. List, ListCat, GetPath
  767. Cursor
  768. Open, Close, GetInfo, SetOption, Reset
  769. List, GetId, GetAttrib, Copy, Delete, Set, Template?
  770. List, GetId, GetAttrib, Copy, Delete, Set?
  771. Field?
  772. Count, List, GetInfo
  773. Column
  774. Count, List?
  775. Macro?
  776. List, GetId, Copy, Delete, Exec?
  777. Formula?
  778. Concat, Concatf, Length, Copy, Reset, Exec
  779. Index?
  780. GetInfo, Count, Navigate, GetPos, SetPos, GetTreePos, SetTreePos, Refresh, Search?
  781. Document
  782. Fetch, Put, Copy, Open, Close, Create, GetInfo, Update, Delete
  783. Bind, Unbind, Count, List, GetInfo, Length, Fetch, GetPtr, Put, Delete
  784. Bind, Unbind, Length, Fetch?
  785. List, Fetch, Put, Delete
  786. Composite?
  787. GetInfo, Merge, Create, Copy, CopySubset, ListText, ImportList, ExportList, Import, Export, GetOSFont, PutOSFont
  788. Comprec?
  789. Count, List, Insert, Update, Delete, Length, Fetch, GetPtr
  790. TextList
  791. Count, Length, Fetch, GetPtr
  792. Datetime
  793. Create, GetInfo, Compare, Diff, Update
  794. Error?
  795. Fetch, SetBuffer, SetProc?
  796. Verbs?
  797. Modifiers Used
  798. EnvString, Interval, Path, Info, Id, Attrib, Pos, TreePos, Ptr, OSFont
  799. EnvString, Option, Status, Interval, Pos, TreePos, Buffer, Proc?
  800. Cat, Text?
  801. Count?
  802. Close?
  803. Reset?
  804. Subset
  805. Create
  806. Delete
  807. Convert?
  808. Length
  809. Unbind
  810. Concat
  811. Length
  812. Fetch?
  813. OSFont, Msg?
  814. Update
  815. Merge?
  816. Insert
  817. Compare?
  818. Import
  819. Export
  820. *Init?
  821. *Term?
  822. *Yield
  823. *Template?
  824. *Concatf
  825. *Navigate?
  826. *Refresh
  827. *Search?
  828. *Send?
  829. * - While most verbs apply to multiple objects, certain objects also support actions specific to that group. Verbs marked with an asterisk are specific to one object.
  830. HiTest orders function parameters with input parameters first and output parameters last. Most functions return an HTSTATUS type return code, which is HTSUCCESS (zero) for success, and one of the nonzero HTFAIL constant values for failure. These functions put all output values into parameters passed by reference to the function. A few functions return a value when there is no significant failure information beyond a NULL or zero value. These functions return values are commonly used as input to other functions.
  831. Whenever reasonable, the same verb within different objects uses the same parameters (e.g., most GetInfo function prototypes look similar). Parameter use is also generally consistent across functions. For example, for most functions an input buffer length of zero directs HiTest to determine the length, and an output buffer length of zero indicates the buffer is sufficiently large. Some parameters are optional and allow a NULL or zero value. The function parameter descriptions describe the effects of a NULL or zero value.
  832. This section defines some of the Notes-related terms used throughout this document. In addition, some of the terminology in this document relates to database APIs in general, and some familiarity in this area is helpful, although not required. Some of these terms are also described below.?
  833. API stands for Application Programming Interface, a set of functions and supporting code and documentation which provides a clean interface to some application. HiTest is a high-level API to Lotus Notes.?
  834. attachment
  835. A file not contained within a document, but bound to a document. Any document may have any number of attachments. Although the attachment is not stored in the document, Notes stores it in the documents database.?
  836. bound dataspace?
  837. A set of memory locations related to a set of specified document items and/or view cells. Using HiTest, data can be fetched to or inserted or updated from these memory locations to the assigned document items and view cells by a single function call.
  838. category
  839. A row within a view which represents a grouping of documents with some commonality. When a column is categorized, Notes groups all documents with the same value for that column together. Notes produces an extra non-document row for each grouping, and the cells in the categorized column for those rows contains the category value. The cells for the categorized column are empty for all other rows.?
  840. child?
  841. See response.?
  842. A data value within a view-based index. Each column and row combination represents a cell. Cell contents cannot be modified -- they exist within Notes as read-only values.?
  843. column
  844. A single piece of metadata within a view. HiTest describes a column by its integer location (e.g., column 1, column 2, ...), as well as other attributes. The data value within a column for a single view row is a cell.?
  845. composite?
  846. A Lotus Notes data type constructed from some number of smaller components called composite records. Each composite record may be in any of a set of data formats (e.g., bitmap, formatted text, audio). Also called rich text or compound text.
  847. composite record
  848. A component of a composite. One or more composite records make up a composite item. Each composite record is of a specific type (e.g., formatted text, graphic, doclink, etc.).?
  849. compound text?
  850. See composite data.?
  851. context?
  852. The conditions under which an action or object is valid. Certain actions and objects are only valid within the context of another object. For example, a composite handle is only valid within the context of its containing document handle, which in turn is only valid within its containing cursor. Closing the cursor closes and invalidates the document and composite handles.?
  853. cursor
  854. A handle which indicates a single API session. Programs may open multiple cursors. A cursor contains the following components: a Notes database handle; options; a formula buffer; an active form, view, and index; and open documents and composites.
  855. database
  856. A collection of documents and metadata within a single .NSF file. Each cursor connects to exactly one database, although multiple cursors may simultaneously connect to the same database.
  857. document
  858. A collection of data items. A document is how Notes stores data. Data within a database is stored in documents.?
  859. fetch?
  860. The process of retrieving data. When fetching a document, a single function call retrieves and converts multiple bound items and cells.?
  861. field?
  862. A single piece of metadata within a form. A field consists of a data type, a name, and other attributes. When using strict binding, all items within a document must also exist within the documents form as fields.
  863. file attachment?
  864. See attachment.?
  865. formula?
  866. A statement executed against a database to perform a specific action. Currently, only selection formulas (i.e., those which produce an index) are valid through the HiTest API. The Lotus Notes formula language defines the syntax of a formula.?
  867. formula buffer
  868. A buffer used for constructing formulas for execution. Each cursor contains one formula buffer. After construction, the formula in the formula buffer may be executed.
  869. formula language
  870. The grammar specification which defines the valid syntax for formulas. The Lotus Notes application documentation defines the Lotus Notes formula language syntax.?
  871. A form is the type of metadata which defines the format for the creation or interpretation of documents. A document often, but not always, contains an item which indicates the document's form. While documents do not require a form (see strict binding), they should unless there is a good reason not to be based on a form. A single database may contain multiple forms.?
  872. full text search
  873. A search of all text within a set of documents. Lotus Notes has the ability to index a database for full text search. Programs may execute a full text search query against some or all of the documents within that database, and any documents which match the query are selected. A full text search query normally consists of one or more words or phrases. The Lotus Notes application documentation defines the Lotus Notes full text search query syntax.?
  874. handle
  875. A handle is a simple (usually integer) value used to indicate some context within the API. Operations which create open data objects (e.g., opening a cursor or document) produce a handle. An open objects handle indicates a particular open object to the API when multiple instances of that type of object may exist. For example, when multiple documents are open, the integer handle indicates which open document to use for a given operation.
  876. hierarchical
  877. A tree-based set. In HiTest, view-based indices are hierarchical since each document in them may have a parent document and/or child documents.?
  878. HiTest
  879. The name of the enhanced Notes API described in this documentation.?
  880. index?
  881. A set of documents produced by executing a selection formula within a cursor. The primary attribute of any index is an ordered collection of documents. There are two types of indices: flat and hierarchical (view-based). Flat indices are produced by a full database search or full text query, and have no hierarchy. Hierarchical indices are produced from the set of documents within a view, and contain a set of cells corresponding to the view display for each document. The process of moving through the documents within an index is navigation. Result set is another term for index. A cursor in which a formula has been executed and results are available contains an active index.
  882. insert
  883. The process of creating a new document in a Notes database.  Programs usually do this with bound dataspace or by creating an empty document and adding items one at a time.?
  884. A data value within a document, on which the HiTest API supports retrieval and assignment. When strict binding is in effect, every item in a document must correspond in name and data type to a field in that documents form.
  885. macro?
  886. A stored Notes object which performs a specified action on request or on schedule. Macro execution can create, modify, or select documents, depending on the type of macro.?
  887. A message sent between e-mail users. Notes supports addressing and sending of documents as mail.
  888. metadata
  889. Data which describes data. The types of metadata relevant to the API (listed with their corresponding data object) are:?
  890.     forms (corresponding to documents);
  891.     fields within forms (corresponding to items within documents);?
  892.     views (corresponding to the set of documents within views);
  893.     columns (corresponding to cells within views).?
  894. navigation
  895. The process of moving through an index. From any point within an index, there are various navigation styles (e.g., next, first, previous parent, etc.) usable to move to other documents in the index. View-based indices support a greater range of navigation styles than flat indices.?
  896. A special undefined value for any data type. This is different from zero-values such as numeric zero and the empty string. In Notes documents, HiTest represents a NULL value by the absence of an item within a document, since Notes has no concept of a NULL value as data.
  897. parent
  898. A parent document is a document to which another document is a response (child). One parent may have multiple responses. The only way to determine a documents responses is by view-based navigation.?
  899. query?
  900. A statement executed against a database to perform an action. In Notes, a query is used to perform a full text search of some or all text within a database. The Lotus Notes application documentation defines the syntax of a query.?
  901. response
  902. A document which references another document as its parent. Programs can determine a documents parent either by view-based navigation or by the value of the documents reference item. The term response is synonymous with child.
  903. response hierarchy
  904. The set and organization of responses beneath a given document is that document's response hierarchy, and may consist of multiple levels (responses may have responses). While a document may have many responses, it may only have one parent.?
  905. rich text?
  906. See composite data.?
  907. A single horizontal entry within a view. Each row (document, category, or totals) in a view contains one cell for each column in the view.
  908. selection formula?
  909. A formula which produces an index, which consists of a subset of the documents within a database.?
  910. server
  911. A named Notes server program that receives and processes requests from clients, contains and maintains a set of Notes databases, and implements security on the databases it controls.
  912. session?
  913. One API connection, with its own internal state and data. A given process may open multiple sessions, each of which may perform independent functions at the same time. Each session is indicated by a cursor.
  914. state?
  915. Each process has a state which defines valid operations at the current time (i.e., data is not accessible from a document which is not open). Certain operations within one state result in a different state.
  916. strict binding
  917. There is no requirement in Notes that items within a document match the fields within that document's form, or even that a document have a form. Since this may cause confusion, and normally the ability to have documents differ in format from forms is unnecessary, the API enforces strict binding by default. This filters document access through the document's form, and forces a consistent structure on items in documents. Strict binding is a cursor-level option.?
  918. summary item
  919. Notes stores certain items as summary items, which may be used in computations and are usually smaller than other non-summary items. Composite items cannot be summary items. In general, most other items are summary items (up to the Notes limit of 15 K of summary data per document).
  920. update
  921. The process of modifying an existing document in a Notes database.  Programs perform updates by using bound dataspace or by adding or replacing items one at a time.
  922. A view contains a sorted and indexed hierarchical set of documents within a database. The set of documents within a view are accessible as a view-based index. A view also contains metadata in the form of columns and data in the form of cells.
  923. These functions are global within a process or task. These functions have no context beneath the process level (i.e., no other functions affect their operation), and are always usable (after calling htInit). While there are other functions with no context, these functions are in the global classification because they do not apply to any object. ?
  924. Every HiTest API program must initialize and terminate the HiTest API. Until calling the HiTest initialization function htInit, all other functions will fail. Additionally, every HiTest program 
  925.  call the htTerm function after all HiTest function calls are complete and before the program terminates. It is crucial to call the termination function to avoid leaving the system in a dangerous state.
  926. The global group contains the following functions:
  927. htConvert        Converts data between data types?
  928. htConvertLength        Returns the length of data converted as indicated
  929. htGetEnvString        Retrieves the value of a Notes environment string variable
  930. htGetInfo        Obtains a piece of process-level information?
  931. htInit            Initializes the HiTest API?
  932. htSetEnvString        Assigns the value of a Notes environment string variable
  933. htSetOption        Assigns the value of a global option?
  934. htTerm            Terminates the HiTest API
  935. src_type
  936.     The data type of the source data.
  937.     src_len
  938.     The length of the source data. A value of zero directs HiTest to determine the length.?
  939.     src_buffer?
  940.     A pointer to the source data.
  941.     dest_type
  942.     The data type to convert to in the destination buffer.?
  943.     dest_len?
  944.     The length of the destination buffer. A value of zero indicates that the buffer is large enough to hold the result data. A length which is insufficient to contain the result is only valid when the destination type is HTTYPE_TEXT and the global option TEXT_TRUNCATE is active. In this case, the resulting text is truncated to fit in the buffer.
  945.     dest_buffer
  946.     The destination buffer.
  947.     actual_len?
  948.     If given, this parameter receives the length of the result buffer data.
  949. HTSTATUS htConvert (src_type, src_len, src_buffer,
  950.                   dest_type, dest_len, dest_buffer,?
  951.                   actual_len);
  952.     HTTYPE    src_type;         /* Input */?
  953.     HTINT        src_len;         /* Input, Optional */
  954.     void        *src_buffer;     /* Input */
  955.     HTTYPE    dest_type;         /* Input */
  956.     HTINT        dest_len;         /* Input, Optional */?
  957.     void        *dest_buffer;     /* Output */
  958.     HTINT        *actual_len;     /* Output, Optional */
  959. src_type
  960.     The data type of the source data.
  961.     src_len
  962.     The length of the source data. A value of zero directs HiTest to determine the length.?
  963.     src_buffer?
  964.     A pointer to the source data.
  965.     dest_type
  966.     The destination data type.?
  967. HTINT htConvertLength (src_type, src_len, src_buffer,?
  968.                      dest_type);
  969.     HTTYPE    src_type;         /* Input */?
  970.     HTINT        src_len;         /* Input, Optional */
  971.     void        *src_buffer;     /* Input */
  972.     HTTYPE    dest_type;         /* Input */
  973. name    ?
  974.     The name of the environment variable to retrieve. In the NOTES.INI file, this is the string to the left of the equal sign. Some examples of useful standard Notes environment variables are:?
  975.             Directory    Notes data directory?
  976.             MailServer    Server name on which Notes users mailbox resides
  977.             MailFile    Database filename of Notes users mailbox
  978.             Domain    Notes users domain
  979.     length?
  980.     The length of the value buffer to receive the environment variable value. The constant HTLEN_ENV_STRING defines the maximum length of an environment variable string. A length of zero indicates that the buffer is large enough to hold the result.?
  981.     value
  982.     The buffer to receive the environment variable The constant HTLEN_ENV_STRING defines the maximum length of an environment variable string. In the NOTES.INI file, this is the string to the right of the equal sign.?
  983. HTSTATUS htGetEnvString (name, length, value);
  984.     char        *name;        /* Input */
  985.     HTINT        length;        /* Input, Optional */
  986.     char        *value;        /* Output */
  987.     One value from an enumeration of global items. Each item corresponds to a type (and length, for variable length types). The following table lists legal items with their corresponding data types and, where relevant, lengths:
  988. constant                    type                    
  989. HTGLOBINFO_USERNAME        char [HTLEN_USERNAME + 1]
  990.     HTGLOBINFO_SERVERNAME        char [HTLEN_SERVERNAME + 1]?
  991.     HTGLOBINFO_CURRENTTIME        HTDATETIME?
  992.     HTGLOBINFO_TIMEZONE        HTINT?
  993.     HTGLOBINFO_DST            HTBOOL
  994.     HTGLOBINFO_HTVERSION        char [HTLEN_VERSION + 1]?
  995.     USERNAME obtains the Notes user name in the Notes ID file;?
  996.     SERVERNAME obtains the name of the locally running Notes server, if any;?
  997.     CURRENTTIME obtains the current datetime;
  998.     TIMEZONE obtains the local time zone as an integer relative to GMT;
  999.     DST indicates whether daylight savings time is currently in effect;
  1000.     VERSION returns the version of HiTest.?
  1001.     buffer?
  1002.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  1003. HTSTATUS htGetInfo (item, buffer);
  1004.     HTGLOBINFO    item;         /* Input */?
  1005.     void        *buffer;        /* Output */?
  1006. name    ?
  1007.     The name of the environment variable to assign. In the NOTES.INI file, this is the string to the left of the equal sign.?
  1008.     value
  1009.     The value to assign to the environment variable. The constant HTLEN_ENV_STRING defines the maximum length of an environment variable string. In the NOTES.INI file, this is the string to the right of the equal sign.?
  1010.     create?
  1011.     Whether to create the environment variable if it doesnt exist (TRUE enables creation).?
  1012.     overwrite
  1013.     Whether to overwrite the environment variable if it does exist (TRUE enables overwrite).?
  1014. HTSTATUS htSetEnvString (name, value, create, overwrite);?
  1015.     char        *name;        /* Input */
  1016.     char        *value;        /* Input */?
  1017.     HTBOOL    create;        /* Input */
  1018.     HTBOOL    overwrite;        /* Input */?
  1019. option
  1020.     One value from an enumeration of global options. Each option corresponds to either a string or integer value. The option value indicates whether to use the string or numeric parameter (the function ignores the other parameter). The following table lists legal options with their corresponding data types, parameters, and defaults:?
  1021. constant                    type        parameter    default
  1022. HTGLOBOPT_BULK_STORE        HTBOOL    number    FALSE?
  1023.     HTGLOBOPT_STRICT_BIND        HTBOOL    number    TRUE
  1024.     HTGLOBOPT_VIEW_POSITION        HTBOOL    number    FALSE?
  1025.     HTGLOBOPT_FETCH_SUMMARY        HTBOOL    number    FALSE?
  1026.     HTGLOBOPT_SUMMARY_LIMIT        HTINT        number    8192
  1027.     HTGLOBOPT_LOCAL_SERVERNAME    char *    string    NULL
  1028.     HTGLOBOPT_TEXT_TRUNCATE        HTBOOL    number    TRUE
  1029.     The basic functions of the options are described below:
  1030.     When bulk store is active, HiTest does not commit changes in document data to disk during a document close, but rather when closing the cursor itself. When bulk store is inactive, closing a document commits all changes to disk.
  1031.     When strict binding is active, HiTest filters all document items through a form (i.e., HiTest uses the form metadata for type-checking). Therefore, items in a document which are either not in the documents form or are of a different data type than the corresponding field in the documents form will not be accessible. When strict binding is inactive, the items in a document are not tied to the forms metadata. This option also affects certain indices. When executing a formula to produce a flat index and strict binding is active, the index only includes documents of the active form. Strict binding has no effect on the documents included in a view-based index, although it does affect items within documents accessed from a view-based index.?
  1032.     When view position is active, view-based indices always keep depth-first ordinal position information. This enables functions which use index positioning (e.g., htIndexGetPos and htIndexSetPos) to find any element in a view-based index by ordinal location. This functionality may significantly reduce speed. When view position is inactive, HiTest performs view-based positioning off the top-level entries within the index and is much more efficient. This option has no effect on flat indices.?
  1033.     When fetch summary is active, htDocFetch operations open documents with summary data only. Use htDocFetch or the HTDOCHANDLE that it returns to access summary items only. When non-summary items (composite and some other large items) are not needed, this option increases fetch speed. When fetch summary is inactive, documents fetched always have all data available.
  1034.     The value of summary limit determines the maximum length of an item which will have its summary flag set. If the summary items for a single document exceed the value HTLEN_SUMMARY_DATA, then Notes may not display the document properly in views, and cell values may not be accessible. If the length of any single item exceeds HTLEN_SUMMARY_DATA, then that item is not usable by Notes in any view. The default value of this option is 8K. The constant HTLEN_SUMMARY_DATA (15K) defines the maximum value of this option).?
  1035.     When local servername is set, the string value assigned for the option is usable in place of NULL to indicate the local server. Also, the list of available servers from htServerList includes this string.
  1036.     When text truncate is active, retrieval of data as text supports truncation of results. Calls to htConvert, htDocFetch, htItemFetch, and htCellFetch with the destination type set to HTTYPE_TEXT will truncate results if necessary, and will not generate an error. Conversions to types other than text do not allow truncation. When text truncate is inactive, no conversions allow truncation.?
  1037.     number?
  1038.     The numeric or boolean value for an option. When setting the value of a boolean option, use the constants TRUE and FALSE.
  1039.     string?
  1040.     The string value for an option.
  1041. HTSTATUS htSetOption (option, number, string);
  1042.     HTGLOBOPT    option;        /* Input */?
  1043.     HTINT        number;        /* Input, Optional */
  1044.     char         *string;         /* Input, Optional */
  1045. FunctionhtSetOptionAssigns the value of a global option.
  1046. Assigns a value to a global option or new cursor default. Depending on the option, the new value is supplied in either the number or string parameter. When setting the value of cursor defaults, the new value has no effect on existing cursors.HTSTATUS return code. Failures include:
  1047.         HTFAIL_ILLEGAL_ENUM (invalid option);
  1048.         HTFAIL_OVERFLOW (value out of bounds).HTSTATUS status;
  1049.         status = htSetOption (HTGLOBOPT_LOCAL_SERVERNAME, 0,
  1050.                                     "Local");htConvert, htServerList, htCurOpen, htCurSetOption, htIndexGetPos, htIndexSetPos, htDocFetch, htItemFetch, htCellFetch(Global)
  1051. ##########################################################
  1052. FunctionhtTermTerminates the HiTest API.
  1053. Shuts down the HiTest API for the current process or task. Before terminating, this function closes any open cursors by calling htCurClose. After calling htTerm, no other HiTest functions may be called except htInit. It is crucial that every HiTest program call htTerm.HTSTATUS return code.HTSTATUS status;
  1054.         status = htTerm ();htInit, htCurClose(Global)######################
  1055. FunctionhtAddinGetIntervalPolls for scheduling interval events.
  1056. Polls the HiTest scheduler to determine if any assigned intervals have occurred. Programs may set intervals with the htAddinSetInterval function. Each time an interval occurs, a call to htAddinGetInterval succeeds and returns information about the interval. Programs can either poll this function periodically or temporarily surrender program control. When a program surrenders control, HiTest waits for the next interval and then returns. HiTest can manage multiple simultaneous intervals.
  1057.         When giving control to this function under Windows, messages are passed through to the calling application by HiTest. A WM_QUIT message in this state causes this function to return to the calling application for a normal shutdown. A nested call to this function or htAddinYield while processing a message will fail.HTSTATUS return code. Failures include:
  1058.         HTFAIL_DATA_UNAVAIL (no intervals set or no interval has occurred);
  1059.         HTFAIL_END_OF_DATA (Windows nested callback or WM_QUIT received).HTINT interval, iteration;
  1060.         HTSTATUS status;
  1061.         status = htAddinSetInterval (60);
  1062.         while (!htAddinGetInterval (TRUE, &interval, &iteration))
  1063.             printf ("\nAnother %ld seconds have passed", interval);htAddinSetInterval, htAddinYieldAddin###################################################
  1064. FunctionhtAddinPutMsg
  1065.         OS/2 1.3 onlyLogs an event in the Notes log and to the Notes server console.
  1066. Logs a message or error to the Notes log and server console. The message is of the format <DATE> <TIME> <string>:<error>. This function controls the contents of the string and whether to have HiTest append the error string. If there is no locally running Notes server, the message appears on the standard output instead. When using this function, HiTest programs must be built with a STRINGTABLE resource using the constant HTADDIN_RESOURCE_MSG with a resource value of %s.HTSTATUS return code. Failures include:
  1067.         HTFAIL_BAD_FORMAT (no message data - string is NULL and error is FALSE)HTSTATUS status;
  1068.         status = htAddinPutMsg (TRUE, "Received an error message");htAddinSetStatus, htErrorFetchAddin#####################################################
  1069. 7qSJP
  1070. FunctionhtAddinSetIntervalSets a scheduling interval.
  1071. Sets or removes a scheduling interval for the HiTest scheduler. After setting an interval, htAddinGetInterval will successfully return the interval event every interval seconds. HiTest can manage multiple simultaneous intervals.HTSTATUS return code. Failures include:
  1072.         HTFAIL_DUPLICATE (the interval exists);
  1073.         HTFAIL_DATA_UNAVAIL (cannot remove an interval which isnt set).HTSTATUS status;
  1074.         status = htAddinSetInterval (60);htAddinGetInterval, htAddinYieldAddin###############
  1075. FunctionhtAddinSetStatus
  1076.         OS/2 1.3 onlySets a Notes server console task status line.
  1077. Controls the contents of any Notes server console status line for this task. When a HiTest program is running on a Notes server, it may create a task status line on the Notes server. This line appears in response to the SHOW TASKS console command (executable with the htServerExec function). The line consists of a program name and status. For a program name to display, build the HiTest program with a STRINGTABLE resource using the constant HTADDIN_RESOURCE_NAME. Notes will display the value of this resource as the program name. This function controls whether to display the status line, and the contents of the status part of the line. HiTest removes any status line on termination.HTSTATUS return code. Failures include:
  1078.         HTFAIL_DATA_UNAVAIL (HiTest cannot set the status line).HTSTATUS status;
  1079.         status = htAddinSetStatus (TRUE, "Addin task status line");htAddinPutMsg, htServerExec, htTermAddin########################################################
  1080. FunctionhtAddinYieldYields processor control for a specified period.
  1081. Suspends processing of the current task or process for a specified time. This functionality is also available within the htAddinGetInterval function, in the form of waiting for a scheduler interval. When running under Windows and not using the wait option of htAddinGetInterval, programs should call this function periodically with a delay of zero to allow other tasks to run.
  1082.         When giving control to this function under Windows, messages are passed through to the calling application by HiTest. A WM_QUIT message in this state causes this function to return to the calling application for a normal shutdown. A nested call to this function or htAddinGetInterval while processing a message will fail.HTSTATUS return code. Failures include:
  1083.         HTFAIL_BAD_FORMAT (negative delay is invalid);
  1084.         HTFAIL_END_OF_DATA (Windows nested callback or WM_QUIT received).HTSTATUS status;
  1085.         status = htAddinYield (1000);htAddinSetInterval, htAddinGetIntervalAddin######################
  1086. FunctionhtCellBindBinds a cell column to a program variable.
  1087. Creates a binding between a variable in the calling program and a cell / view column in the active view-based index. Use htDocFetch to fetch data for bound cells from the current entry in a view-based index. Use cell binding when fetching the same set of cells from multiple view rows. Create cell bindings after using htFormulaExec to produce a view-based index. Remove cell bindings with htFormulaExec, htCurReset, or htCellUnbind with the same column number. Fetching a document causes all bound cells to be converted and transferred from the current view row to the bound buffers. Unlike bound items, cell binding is not relevant for data storing (htDocPut and htDocUpdate).HTSTATUS return code. Failures include:
  1088.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1089.         HTFAIL_DATA_UNAVAIL (no active view-based index);
  1090.         HTFAIL_INVALID_COLUMN (column number is out of range).char date_string [HTLEN_DATETIME_TEXT + 1];
  1091.         HTSTATUS status;
  1092.         status = htCellBind (cursor, 1, HTTYPE_TEXT, 0, date_string,
  1093.                                    NULL);htCellUnbind, htFormulaExec, htDocFetch, htItemBind, htCurResetCell
  1094. ##########################################################
  1095. FunctionhtCellFetchConverts and retrieves the data for a cell into a supplied buffer.
  1096. Transfers the cells data from the current view-based index entry to a supplied buffer. If requested, HiTest converts the data before writing it to the buffer. Use htCellLength to determine the required buffer length.HTSTATUS return code. Failures include:
  1097.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1098.         HTFAIL_DATA_UNAVAIL (no active view-based index);
  1099.         HTFAIL_INVALID_COLUMN (column number is out of range);
  1100.         HTFAIL_INVALID_CONVERT (cell type does not convert to requested type);
  1101.         HTFAIL_OVERFLOW (retrieved data does not fit in supplied buffer).HTINT length = 0;
  1102.         HTTYPE type = HTTYPE_DATETIME;
  1103.         HTDATETIME datetime;
  1104.         HTSTATUS status;
  1105.         status = htCellFetch (cursor, 1, &type, &length, &datetime);htCellLength, htFormulaExec, htIndexNavigateCell#############################################
  1106. FunctionhtCellLengthObtains the length of a cell as converted to a specified data type.
  1107. Obtains the length of a cells data from the current view-based index entry as converted to a specified data type. Use this length to allocate a buffer of the proper length for htCellFetch.HTSTATUS return code. Failures include:
  1108.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1109.         HTFAIL_DATA_UNAVAIL (no active view-based index);
  1110.         HTFAIL_INVALID_COLUMN (column number is out of range);
  1111.         HTFAIL_INVALID_CONVERT (cell type does not convert to requested type).HTINT length;
  1112.         HTSTATUS status;
  1113.         status = htCellLength (cursor, 1, HTTYPE_TEXT, &length);htCellFetchCell
  1114. ##########################################################
  1115. FunctionhtCellUnbindRemoves the binding of a cell column.
  1116. Cancels the effects of any htCellBind performed with the same column number. Producing a new index automatically cancels all bindings.HTSTATUS return code. Failures include:
  1117.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1118.         HTFAIL_INVALID_COLUMN (column number is not bound).HTSTATUS status;
  1119.         status = htCellUnbind (cursor, 1);htCellBind, htCurResetCell
  1120. ##########################################################
  1121. FunctionhtColumnCountObtains the number of columns in a view.
  1122. Obtains the number of columns in the indicated view.HTSTATUS return code. Failures include:
  1123.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1124.         HTFAIL_INVALID_VIEW (view does not exist).HTINT colcount;
  1125.         HTSTATUS status;
  1126.         status = htColumnCount (cursor, viewid, colcount);htViewGetId, htColumnListColumn#########################################
  1127. FunctionhtColumnListIterates through columns in a view.
  1128. Returns the first or next column information from the list of columns in the view.HTSTATUS return code. Failures include:
  1129.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1130.         HTFAIL_INVALID_VIEW (view does not exist);
  1131.         HTFAIL_END_OF_DATA (no more columns).HTCOLUMN column;
  1132.         HTSTATUS status;
  1133.         status = htColumnList (cursor, FALSE, &column);htViewGetId, htColumnCountColumn####################################
  1134. ObjectComprec###################
  1135. FunctionhtCompCopyCreates a new composite whose contents are a copy of another composite.
  1136. Creates a new composite within a document from the data in an existing composite. The new composite becomes an item in the document with the given item name. Creating a composite with no item name results in a temporary composite that is destroyed when closing the document.HTSTATUS return code. Failures include:
  1137.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1138.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  1139.         HTFAIL_INVALID_FIELD (field is not in the documents form).HTCOMPHANDLE newcomp;
  1140.         HTSTATUS status;
  1141.         status = htCompCopy (oldcomp, dochand, "NewBody", &newcomp);htCompCreate, htCompCopySubsetComposite
  1142. ##########################################################
  1143. FunctionhtCompCopySubsetCreates a new composite whose contents are a partial copy of another composite.
  1144. Creates a new composite within a document from part of the data in an existing composite. The new composite becomes an item in the document with the given item name. Creating a composite with no item name results in a temporary composite destroyed when closing the document.HTSTATUS return code. Failures include:
  1145.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1146.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  1147.         HTFAIL_INVALID_FIELD (field is not in the documents form);
  1148.         HTFAIL_END_OF_DATA (index is invalid).HTCOMPHANDLE newcomp;
  1149.         HTSTATUS status;
  1150.         status = htCompCopySubset (oldcomp, 1, 20, dochand,
  1151.                                            "NewBody", &newcomp);htCompCopy, htComprecCountComposite##############
  1152. FunctionhtCompCreateCreates a new, empty composite within a document.
  1153. Creates a new empty composite within a document. The new composite becomes an item in the document with the given item name. Creating a composite with no item name results in a temporary composite destroyed when closing the document.HTSTATUS return code. Failures include:
  1154.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  1155.         HTFAIL_INVALID_FIELD (field is not in the documents form).HTCOMPHANDLE comphand;
  1156.         HTSTATUS status;
  1157.         status = htCompCreate (dochand, "NewBody", &comphand);htCompGetInfo, htCompCopy, htCompImportComposite#####################################################
  1158. FunctionhtCompExportExports a composite to a file in a selected format.
  1159. Creates a file from a composite object. HiTest supports export to any export format normally supported by Notes.HTSTATUS return code. Failures include:
  1160.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1161.         HTFAIL_INVALID_IMPEXP (invalid export format).HTSTATUS status;
  1162.         status = htCompExport (comphand, "filename.rtf",
  1163.                                      "MicrosoftWord RTF");htCompExportList, htCompImportComposite#########################################
  1164. ObjectCursor####################
  1165. ObjectDatabase##################
  1166. The addin functions are for scheduling, server console control, and message logging. These functions allow a program to exercise some control over a local Notes server console. Additionally, HiTest contains a scheduler which programs can use to schedule actions at periodic intervals. Programs using addin functionality often run on a Notes server, but this is not a requirement. Addin programs are written and run like any other HiTest API program, but use the htAddin functions.
  1167. The addin group contains the following functions:?
  1168. htAddinGetInterval    Polls for scheduling interval events?
  1169. htAddinPutMsg        Logs an event in the Notes log and to the Notes server console?
  1170. htAddinSetInterval    Sets a scheduling interval?
  1171. htAddinSetStatus        Sets a Notes server console task status line
  1172. htAddinYield        Yields processor control for a specified period?
  1173.     Whether to wait for the next interval. A value of TRUE directs htAddinGetInterval to yield processing until the next interval occurs. A value of FALSE directs htAddinGetInterval to return immediately, regardless of whether an interval has occurred.?
  1174.     interval?
  1175.     The buffer to receive the interval which occurred. The interval is the same value set with htAddinSetInterval. If no interval has occurred, HiTest sets this value to zero.
  1176.     iteration
  1177.     The buffer to receive the execution count for this interval. The first time an interval occurs, HiTest sets this value to one, and then one greater each succeeding interval. This is useful for performing an action after an interval occurs a certain number of times. If no interval has occurred, HiTest sets this value to zero.?
  1178. HTSTATUS htAddinGetInterval (wait, interval, iteration);
  1179.     HTBOOL    wait;            /* Input */?
  1180.     HTINT        *interval;        /* Output */
  1181.     HTINT        *iteration;        /* Output, Optional */?
  1182. error?
  1183.     Whether to append the current HiTest error message to the string. A value of TRUE and a valid current error message will append a colon followed by the error message.?
  1184.     string?
  1185.     The string to use in the message.
  1186. HTSTATUS htAddinPutMsg (error, string);?
  1187.     HTBOOL    error;        /* Input */?
  1188.     char        *string;        /* Input */
  1189. interval
  1190.     The interval to set, in seconds. A negative interval removes the interval (e.g., -5 will remove any 5 interval). An interval of zero clears all intervals.?
  1191. HTSTATUS htAddinSetInterval (interval);?
  1192.     HTINT        interval;        /* Input */
  1193.     Whether to show a status line on the Notes server console. All programs start with no status line. A value of TRUE displays the status line. A value of FALSE removes any displayed status line.?
  1194.     status?
  1195.     The status value to display. HiTest ignores this parameter if the show parameter is FALSE. To display a status line but no status value, use NULL or the empty string.?
  1196. HTSTATUS htAddinSetStatus (show, status);?
  1197.     HTBOOL    show;            /* Input */?
  1198.     char        *status;        /* Input, Optional */
  1199. delay_msec
  1200.     The number of milliseconds to wait before resuming processing. A value of zero will surrender only the current timeslice.
  1201. HTSTATUS htAddinYield (delay_msec);?
  1202.     HTINT        delay_msec;        /* Input */
  1203. A Notes view contains both metadata and data. The metadata part is a set of columns. The data part is a set of cells. Each row in a view represents a document, a category, or totals. The overall view data creates an NxM table of data cells, where N is the number of columns and M is the number of documents. Notes computes these read-only cells from document data. The primary attributes of a cell are a column number, a view row, and a data value.
  1204. To render cell data into a view resembling the Notes UI format, programs must follow certain guidelines. The Notes UI normally truncates the data for a given cell at the right boundary of the cells column. In two situations, though, a cells data overruns the right boundary, and no more cell data exists for the row. The first case is for response documents in response-only columns (indicated by the flags field in the column attributes structure). The second case is for category rows (indicated by the document ID returned from htIndexNavigate. Additionally, when a view row is beneath the top level (i.e., a response document or a cascading category), the indent returned from htIndexNavigate indicates the number of indentation levels. The Notes UI represents each indentation level with three spaces preceding the rows data. Finally, if a columns attributes have the ICON flag set, then the cell data indicates the Notes icon to use in place of the data value. There are five icons, represented by the values 1 through 5, which are described in the Lotus Notes application documentation.?
  1205. The cell group contains the following functions:
  1206. htCellBind        Binds a cell column to a program variable?
  1207. htCellFetch        Converts and retrieves the data for a cell into a supplied buffer
  1208. htCellLength        Obtains the length of a cell as converted to a specified data type
  1209. htCellUnbind        Removes the binding of a cell column
  1210. cursor
  1211.     The cursor containing the desired index.?
  1212.     column?
  1213.     The column number to bind. The first column number in a view is one.?
  1214.     type?
  1215.     The data type for data in the supplied buffer. When fetching, HiTest converts cell data to this type before writing it into the buffer. This enables automatic conversion between a cells data and the supplied buffer. A value of zero directs HiTest to use the type HTTYPE_TEXT.
  1216.     length?
  1217.     The maximum length of the supplied buffer. Use zero when supplying a buffer known to be of sufficient length.
  1218.     buffer?
  1219.     The buffer into which to copy the cell data.?
  1220.     datalen
  1221.     The buffer to receive the fetched cell data length. When fetching a cell, HiTest sets this value to the actual length of the data retrieved. Use NULL to omit this functionality.
  1222. HTSTATUS htCellBind (cursor, column, type, length, buffer,
  1223.                    datalen);
  1224.     HTCURSOR    cursor;         /* Input */?
  1225.     HTINT        column;         /* Input */?
  1226.     HTTYPE    type;         /* Input, Optional */?
  1227.     HTINT        length;         /* Input, Optional */?
  1228.     void        *buffer;         /* Input */?
  1229.     HTINT        *datalen;         /* Input, Optional */?
  1230. cursor
  1231.     The cursor containing the view-based index.
  1232.     column?
  1233.     The column number from which to retrieve cell data.
  1234.     type?
  1235.     The data type representing the destination type -- HiTest converts the cell data to this type before writing it into the supplied buffer. A value directs HiTest to use the type HTTYPE_TEXT.
  1236.     length?
  1237.     The length of the supplied buffer. A value zero or a NULL pointer indicates that the buffer is large enough to hold the result data. A value of zero directs HiTest to return the retrieved data length in this location. Use htCellLength to determine the length before retrieving the data. A length which is insufficient to contain the result is valid only when the destination type is HTTYPE_TEXT and the global option TEXT_TRUNCATE is active. In this case, the resulting text is truncated to fit in the buffer.
  1238.     buffer?
  1239.     The buffer to receive the converted data value.
  1240. HTSTATUS htCellFetch (cursor, column, type, length, buffer);
  1241.     HTCURSOR    cursor;         /* Input */?
  1242.     HTINT        column;         /* Input */?
  1243.     HTTYPE    *type;        /* Input/Output, Optional */
  1244.     HTINT        *length;         /* Input/Output, Optional */?
  1245.     void        *buffer;         /* Output */
  1246. cursor
  1247.     The cursor used containing the view-based index.?
  1248.     column?
  1249.     The column number for which the length is determined.
  1250.     type?
  1251.     The data type representing the destination type -- the length returned is the length of the cell data as converted to this type. A value directs HiTest to use the type HTTYPE_TEXT.?
  1252.     length?
  1253.     The buffer to receive the data length. This is the length of the data as converted to the requested type.
  1254. HTSTATUS htCellLength (cursor, column, type, length);?
  1255.     HTCURSOR    cursor;         /* Input */?
  1256.     HTINT        column;         /* Input */?
  1257.     HTTYPE    *type;         /* Input/Output, Optional */?
  1258.     HTINT        *length;         /* Output */?
  1259. cursor
  1260.     The cursor used in the binding operation.
  1261.     column?
  1262.     The column number used in the binding operation.?
  1263. HTSTATUS htCellUnbind (cursor, column);?
  1264.     HTCURSOR    cursor;         /* Input */?
  1265.     HTINT        column;         /* Input */?
  1266. A column defines one data column and optionally one index within a view. Notes produces rows (documents, categories, and totals) when computing a view. The meeting of one column and one row is a cell. The primary attributes of a column are a title and index.
  1267. The following flags define column attributes in the HTCOLUMN structure:?
  1268. HTCOLUMN_SORT            Column is sorted (indexed)
  1269. HTCOLUMN_SORT_CAT        Column is a category?
  1270. HTCOLUMN_SORT_DESC        Sort descending (default is ascending)
  1271. HTCOLUMN_HIDDEN            Column is hidden
  1272. HTCOLUMN_RESPONSE        Column is a response-only column?
  1273. HTCOLUMN_HIDE_DETAIL        Hide detail on subtotaled columns?
  1274. HTCOLUMN_ICON            Display icon instead of text
  1275. HTCOLUMN_JUSTIFY_RIGHT        Right justify (default is left)?
  1276. HTCOLUMN_JUSTIFY_CENTER    Center justify (default is left)
  1277. The column attributes may include no more than one of the following flags:
  1278. HTCOLUMN_TOTAL            Total all values?
  1279. HTCOLUMN_AVG_PER_CHILD        Average per child?
  1280. HTCOLUMN_PCT_OF_VIEW        Percent of total view?
  1281. HTCOLUMN_PCT_OF_PARENT        Percent of parent category
  1282. HTCOLUMN_AVG_PER_DOC        Average per document
  1283. Use the HTCOLUMN_MASK_TOTAL constant to exclude non-totals attributes from column flags (e.g., flags & HTCOLUMN_MASK_TOTAL).
  1284. htColumnList returns the following column attribute structure:
  1285. typedef struct
  1286.   char name [HTLEN_COLUMNNAME + 1];    /* Column name */?
  1287.   HTINT width;                /* Display width in 1/8 avg. char?
  1288.                            units */?
  1289.   HTFLAGS flags;                /* Column flags (HTCOLUMN_xxx) */?
  1290.   HTFONT font;                /* Column font information */?
  1291. } HTCOLUMN;                    /* Column attribute structure */
  1292. The column group contains the following functions:
  1293. htColumnCount        Obtains the number of columns in a view
  1294. htColumnList        Iterates through columns in a view
  1295. cursor
  1296.     The cursor containing the view.
  1297.     viewid?
  1298.     The view from which to obtain the column count.
  1299.     colcount?
  1300.     The buffer to receive the number of columns in the view.?
  1301. HTSTATUS htColumnCount (cursor, viewid, colcount);
  1302.     HTCURSOR    cursor;         /* Input */?
  1303.     HTVIEWID    viewid;         /* Input */?
  1304.     HTINT        *colcount;         /* Output */?
  1305. cursor
  1306.     The cursor containing the view.
  1307.     viewid?
  1308.     The view from which to list columns.?
  1309.     first
  1310.     Whether to get the first or next column. TRUE resets the column list, FALSE obtains the next column in the list. This value is always TRUE on the first call for a given view.?
  1311.     column?
  1312.     The structure to receive information on the column. See the Column object section preceding the htColumn functions for a description of this structure and its contents.?
  1313. HTSTATUS htColumnList (cursor, viewid, first, column);
  1314.     HTCURSOR    cursor;         /* Input */?
  1315.     HTVIEWID    viewid;         /* Input */?
  1316.     HTBOOL    first;         /* Input */
  1317.     HTCOLUMN    *column;         /* Output */?
  1318. Composite objects are a special free-form data type within Lotus Notes. Each composite consists of one or more subcomponents called composite records. Internally, Notes stores a composite object as one or more items within a document. When using multiple items, the name is the same for all the items, and HiTest handles and presents them as a single item. The primary attributes of a composite are an item name, a handle, and a value. HiTest uses the constant NULLHANDLE to represent an invalid composite handle. Composite data is synonymous with rich text or compound text.?
  1319. A composite handle represents an existing or new composite item. Obtain a handle to an existing composite item by retrieving the items value with htDocFetch, htItemFetch, or htItemGetPtr. The composite handle is the value retrieved by these functions. Certain composite functions (htCompCreate, htCompCopy, htCompCopySubset, and htCompImport) create a new composite item in a supplied document. Normally, when closing a document containing one or more open composite handles, HiTest stores the new composite values in the document (unless discarding the changes -- see htDocClose). Alternatively, a composite item created with the htComp functions with a NULL or empty item name is a temporary composite value discarded when the composite handle becomes invalid. This functionality is useful as a composite scratchpad or when manipulating composite data from a composite item considered read-only. HiTest supports multiple nameless composite items within a document (i.e., the composite handles are different for each).?
  1320. The composite group contains the following functions:?
  1321. htCompCopy        Creates a new composite whose contents are a copy of another composite
  1322. htCompCopySubset    Creates a new composite whose contents are a partial copy another composite
  1323. htCompCreate        Creates a new, empty composite within a document
  1324. htCompExport        Exports a composite to a file in a selected format
  1325. htCompExportList    Iterates through available composite export formats
  1326. htCompGetInfo        Obtains a piece of information from and about an open composite
  1327. htCompGetOSFont    Obtains operating system-specific font information from a Notes font
  1328. htCompImport        Imports and converts a file into a new composite
  1329. htCompImportList    Iterates through available composite import formats
  1330. htCompListText        Iterates through text in a composite.?
  1331. htCompMerge        Merges the contents of one composite into another composite
  1332. htCompPutOSFont    Generates a Notes font from operating system-specific font information
  1333. src_comphand
  1334.     The composite to copy.?
  1335.     dochand
  1336.     The document in which to create the new composite.?
  1337.     itemname?
  1338.     The item name for the new composite. An item name of NULL or the empty string creates a temporary composite for use as a scratchpad. Closing the containing document destroys a temporary composite.?
  1339.     newcomp
  1340.     The buffer to receive the handle to the new composite.?
  1341. HTSTATUS htCompCopy (src_comphand, dest_dochand, itemname,
  1342.                    dest_comphand);
  1343.     HTCOMPHANDLE    src_comphand;     /* Input */
  1344.     HTDOCHANDLE        dest_dochand;     /* Input */
  1345.     char            *itemname;         /* Input, Optional */
  1346.     HTCOMPHANDLE    *dest_comphand;     /* Output */?
  1347. src_comphand
  1348.     The composite to copy.?
  1349.     start
  1350.     The composite record index in the source composite at which to begin the data copy. The first composite record is index one. Use the htComprecCount function to obtain the last index for a particular composite.
  1351.     count
  1352.     The number of composite records to copy from the source composite.?
  1353.     dochand
  1354.     The document in which to create the new composite.?
  1355.     itemname?
  1356.     The item name for the new composite. An item name of NULL or the empty string creates a temporary composite for use as a scratchpad. Closing the containing document destroys a temporary composite.?
  1357.     newcomp
  1358.     The buffer to receive the handle to the new composite.?
  1359. HTSTATUS htCompCopySubset (src_comphand, start, count,
  1360.                        dest_dochand, itemname,?
  1361.                        dest_comphand);?
  1362.     HTCOMPHANDLE    src_comphand;     /* Input */
  1363.     HTINT            start;         /* Input */?
  1364.     HTINT            count;         /* Input */?
  1365.     HTDOCHANDLE        dest_dochand;     /* Input */
  1366.     char            *itemname;         /* Input, Optional */
  1367.     HTCOMPHANDLE    *dest_comphand;     /* Output */?
  1368. dochand?
  1369.     The document in which to create the composite.?
  1370.     itemname?
  1371.     The item name for the new composite. An item name of NULL or the empty string creates a temporary composite for use as a scratchpad. Closing the containing document destroys a temporary composite.?
  1372.     newcomp
  1373.     The buffer to receive the handle to the new composite.?
  1374. HTSTATUS htCompCreate (dochand, itemname, newcomp);?
  1375.     HTDOCHANDLE        dochand;         /* Input */
  1376.     char            *itemname;         /* Input, Optional */
  1377.     HTCOMPHANDLE    *newcomp;         /* Output */
  1378. comphand
  1379.     The composite to export.?
  1380.     filename?
  1381.     The file in which the exported data goes. Use the fully specified path if the file is not in the current working directory.
  1382.     format?
  1383.     The composite export format to use for conversion. Use htCompExportList to obtain a list of available export formats.
  1384. HTSTATUS htCompExport (comphand, filename, format);?
  1385.     HTCOMPHANDLE    comphand;         /* Input */?
  1386.     char            *filename;         /* Input */
  1387.     char            *format;         /* Input */
  1388. first?
  1389.     Whether to get the first or next composite export format information. TRUE resets the export format list, FALSE simply obtains the next export format in the list. The value is always TRUE on the first call after htInit.
  1390.     format?
  1391.     The buffer to receive the composite export format string. Each format string defines one export format for the htCompExport function. The constant HTLEN_IMPEXPINFO defines the maximum format string length.
  1392.     extensions?
  1393.     The buffer to receive the composite export format file extensions. Commas separate the extensions, which include the period (e.g., .txt,.asc). The constant HTLEN_IMPEXPINFO defines the maximum extension string length.
  1394. HTSTATUS htCompExportList (first, format, extensions);
  1395.     HTBOOL    first;         /* Input */
  1396.     char        *format;         /* Output */
  1397.     char        *extensions;     /* Output, Optional */?
  1398. FunctionhtCompExportListIterates through available composite export formats.
  1399. Returns the first or next composite export format information from the list of composite export formats.HTSTATUS return code. Failures include:
  1400.         HTFAIL_END_OF_DATA (no more export formats).char format [HTLEN_IMPEXPINFO + 1];
  1401.         char extensions [HTLEN_IMPEXPINFO + 1];
  1402.         HTSTATUS status;
  1403.         status = htCompExportList (FALSE, format, extensions);htCompExport, htCompImportListComposite####
  1404. FunctionhtCompGetInfoObtains a piece of information from and about an open composite.
  1405. Fetches one of various composite-level information items into a supplied buffer. Each item has a data type and the buffer must be sufficiently large to hold the result.HTSTATUS return code. Failures include:
  1406.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1407.         HTFAIL_ILLEGAL_ENUM (invalid item).char compitem [HTLEN_FIELDNAME + 1];
  1408.         HTSTATUS status;
  1409.         status = htCompGetInfo (comphand, HTCOMPINFO_ITEMNAME,
  1410.                                         compitem);htItemFetch, htDocOpen, htDocFetch, htCompCreateComposite#################################################
  1411. FunctionhtCompGetOSFont
  1412.         Windows onlyObtains operating system-specific font information from a Notes font.
  1413. Given a Notes font, obtains operating system-specific font information. HiTest represents OS-specific information with an OS-specific structure.HTSTATUS return code. Failures include:
  1414.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1415.         HTFAIL_INVALID_FONT (cannot find font in document).OSFONT osfont;
  1416.         HTSTATUS status;
  1417.         status = htCompGetOSFont (comphand, htfont, &osfont);htCompPutOSFontComposite########
  1418. FunctionhtCompImportImports and converts a file into a new composite.
  1419. Creates a new composite and imports data from a file into the composite. HiTest supports import to Notes format from any import format normally supported by Notes.HTSTATUS return code. Failures include:
  1420.         HTFAIL_NULL_PARAMETER (comphand and itemname are null - no destination);
  1421.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  1422.         HTFAIL_INVALID_FIELD (field is not in the documents form).
  1423.         HTFAIL_INVALID_IMPEXP (invalid import format).HTCOMPHANDLE comphand;
  1424.         HTSTATUS status;
  1425.         status = htCompImport (dochand, "Body", "filename.rtf",
  1426.                                      "MicrosoftWord RTF", NULL,
  1427.                                      &comphand);htCompImportList, htCompExport, htCompCreateComposite
  1428. ##########################################################
  1429. FunctionhtCompImportListIterates through available composite import formats.
  1430. Returns the first or next composite import format information from the list of composite import formats.HTSTATUS return code. Failures include:
  1431.         HTFAIL_END_OF_DATA (no more import formats).char format [HTLEN_IMPEXPINFO + 1];
  1432.         char extensions [HTLEN_IMPEXPINFO + 1];
  1433.         HTSTATUS status;
  1434.         status = htCompImportList (FALSE, format, extensions);htCompImport, htCompExportListComposite####
  1435. FunctionhtCompListTextIterates through text in a composite.
  1436. Returns the first or next text data from a composite. Unlike standard conversion with htConvert, this function can retrieve and apply formatting to all text within a composite by iterating through the text in the composite. Non-text elements in the composite are ignored. This function optionally performs certain text formatting: word wrap, tab replacement with spaces, and a program-defined newline string. Multiple calls to this function for a single composite retrieves all text from the composite.HTSTATUS return code. Failures include:
  1437.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1438.         HTFAIL_OVERFLOW (length of zero or less than one line with word wrap is invalid);
  1439.         HTFAIL_END_OF_DATA (no more text in the composite).char *buffer;
  1440.         HTINT length;
  1441.         HTSTATUS status;
  1442.         buffer = malloc (BUFLEN + 1);
  1443.         status = htCompListText (comphand, TRUE, 80, 8, NULL,
  1444.                                          BUFLEN, buffer, &length);htConvert, htItemFetch, htItemGetPtrComposite###########################################
  1445. FunctionhtCompMergeMerges the contents of one composite into another composite.
  1446. Inserts the contents of one composite into another composite at a specified index. The insertion does not affect the composite being added into the other composite.HTSTATUS return code. Failures include:
  1447.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1448.         HTFAIL_DUPLICATE (cannot merge a composite into itself);
  1449.         HTFAIL_END_OF_DATA (index is invalid).HTSTATUS status;
  1450.         status = htCompMerge (maincomp, addcomp, 0);htComprecCountComposite###
  1451. FunctionhtCompPutOSFont
  1452.         Windows onlyGenerates a Notes font from operating system-specific font information.
  1453. Given an operating system-specific font, generates a Notes font. A font not currently used in the composites document is stored in an internal font item in the document. HiTest represents OS-specific information with an OS-specific structure.HTSTATUS return code. Failures include:
  1454.         HTFAIL_INVALID_COMPOSITE (invalid composite handle).HTFONT htfont;
  1455.         HTSTATUS status;
  1456.         status = htCompPutOSFont (comphand, osfont, &htfont);htCompGetOSFontComposite################################
  1457. FunctionhtComprecCountObtains the number of composite records in a composite.
  1458. Obtains the number of composite records in the composite. Each composite element (e.g., text run, paragraph, etc.) is a single composite record.HTSTATUS return code. Failures include:
  1459.         HTFAIL_INVALID_COMPOSITE (invalid composite handle).HTINT count;
  1460.         HTSTATUS status;
  1461.         status = htComprecCount (comphand, &count);htComprecListComprec########################################################
  1462. FunctionhtComprecDeleteDeletes one or more consecutive composite records from a composite.
  1463. Deletes one or more consecutive composite records from a composite.HTSTATUS return code. Failures include:
  1464.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1465.         HTFAIL_END_OF_DATA (index is invalid).HTSTATUS status;
  1466.         status = htComprecDelete (comphand, 10, 5);htComprecInsert, htComprecUpdateComprec###########
  1467. FunctionhtComprecFetchRetrieves the data from a composite record.
  1468. Obtains the data from a specified composite record and copies it into a supplied structure. HiTest also copies any variable length component into a supplied buffer within the structure. Certain composite record types have no variable length component (e.g., PAB definition, paragraph). Other composite record types do have a variable length component (e.g., text, blob). Composite record data structures (HTC_ structures) with a pointer element have variable length components. Use htComprecLength to determine the length of the variable length component for a specific composite. The pointer element in the composite record structure must indicate a buffer (allocated by the calling program) of this length. To obtain a faster read-only, temporary direct pointer to the variable length component, use the similar function htComprecGetPtr.HTSTATUS return code. Failures include:
  1469.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1470.         HTFAIL_END_OF_DATA (index is invalid);
  1471.         HTFAIL_OVERFLOW (record variable length component pointer is NULL);
  1472.         HTFAIL_INVALID_CONVERT (composite records only convert to BLOB);
  1473.         HTFAIL_DATA_UNAVAIL (cannot find doclink $LINKS item information);
  1474.         HTFAIL_INVALID_DATABASE (cannot find doclink database);
  1475.         HTFAIL_INVALID_DOCUMENT (cannot find doclink document);
  1476.         HTFAIL_INVALID_VIEW (cannot find doclink view).HTC_PABDEF pabdef;
  1477.         HTCOMP comptype = HTCOMP_PABDEF;
  1478.         HTSTATUS status;
  1479.         status = htComprecFetch (comphand, 1, &comptype, &pabdef);htComprecLength, htComprecGetPtrComprec#####################################################
  1480. tghOl
  1481. FunctionhtComprecGetPtrRetrieves the values and a data pointer from a composite record.
  1482. Obtains the data from a specified composite record and copies it into a supplied structure. HiTest also returns a temporary, read-only pointer to any variable length component in the structure. Certain composite record types have no variable length component (e.g., PAB definition, paragraph). Other composite record types do have a variable length component (e.g., text, blob). Composite record data structures (HTC_ structures) with a pointer element have variable length components. To obtain a modifiable copy of the data contents, use the similar function htComprecFetch. This function is faster than htComprecFetch when accessing composite records with variable length data.HTSTATUS return code. Failures include:
  1483.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1484.         HTFAIL_END_OF_DATA (index is invalid);
  1485.         HTFAIL_INVALID_CONVERT (composite records conversion not allowed);
  1486.         HTFAIL_DATA_UNAVAIL (cannot find doclink $LINKS item information);
  1487.         HTFAIL_INVALID_DATABASE (cannot find doclink database);
  1488.         HTFAIL_INVALID_DOCUMENT (cannot find doclink document);
  1489.         HTFAIL_INVALID_VIEW (cannot find doclink view).HTC_PABDEF pabdef;
  1490.         HTCOMP comptype = HTCOMP_PABDEF;
  1491.         HTSTATUS status;
  1492.         status = htComprecGetPtr (comphand, 1, &comptype, &pabdef);htComprecLength, htComprecFetchComprec########
  1493. F9R)"
  1494. FunctionhtComprecInsertInserts a single composite record into an existing composite.
  1495. Inserts a new composite record into an existing composite at a specified location.HTSTATUS return code. Failures include:
  1496.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1497.         HTFAIL_END_OF_DATA (index is invalid);
  1498.         HTFAIL_BAD_FORMAT (cannot create composite record from compdata value);
  1499.         HTFAIL_INVALID_CURSOR (doclink cursor is invalid);
  1500.         HTFAIL_INVALID_DOCUMENT (doclink document handle is invalid);
  1501.         HTFAIL_INVALID_VIEW (doclink view ID is invalid).HTSTATUS status;
  1502.         HTC_PABREF pabref;
  1503.         pabref.pabid = 2;
  1504.         status = htComprecInsert (comphand, 10, HTCOMP_PABREF,
  1505.                                           &pabref);htComprecUpdate, htComprecDeleteComprec###
  1506. FunctionhtComprecLengthObtains the length of the variable length portion of a composite record.
  1507. Obtains the length of the variable length portion of a specified composite record. Certain composite record types have no variable length component (e.g., PAB definition, paragraph). Other composite record types do have a variable length component (e.g., text, blob). Composite record data structures (HTC_ structures) with a pointer element have variable length components.HTSTATUS return code. Failures include:
  1508.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1509.         HTFAIL_END_OF_DATA (index is invalid);
  1510.         HTFAIL_INVALID_CONVERT (composite records only convert to BLOB).HTINT length;
  1511.         HTCOMP comptype;
  1512.         HTSTATUS status;
  1513.         status = htComprecLength (comphand, 1, &comptype, &length);htComprecFetch, htComprecGetPtrComprec############
  1514. FunctionhtComprecListIterates through composite records in a composite.
  1515. Returns the first or next composite record information from the list of composite records in the composite. Use this function to list all composite records, or find those of a specific composite record type.HTSTATUS return code. Failures include:
  1516.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1517.         HTFAIL_END_OF_DATA (no more composite records).HTCOMP comptype = 0;
  1518.         HTINT index;
  1519.         HTSTATUS status;
  1520.         status = htComprecList (comphand, FALSE, &comptype, &index);htComprecCountComprec########################
  1521. FunctionhtComprecUpdateModifies the contents of a single composite record.
  1522. Modifies the contents of a specified composite record. This is equivalent to deleting and then inserting a single composite record.HTSTATUS return code. Failures include:
  1523.         HTFAIL_INVALID_COMPOSITE (invalid composite handle);
  1524.         HTFAIL_END_OF_DATA (index is invalid);
  1525.         HTFAIL_BAD_FORMAT (cannot create composite record from compdata value);
  1526.         HTFAIL_INVALID_CURSOR (doclink cursor is invalid);
  1527.         HTFAIL_INVALID_DOCUMENT (doclink document handle is invalid);
  1528.         HTFAIL_INVALID_VIEW (doclink view ID is invalid).HTSTATUS status;
  1529.         HTC_PABREF pabref;
  1530.         pabref.pabid = 2;
  1531.         status = htComprecUpdate (comphand, 10, HTCOMP_PABREF,
  1532.                                           &pabref);htComprecInsert, htComprecDeleteComprec############################
  1533. FunctionhtCurCloseCloses an open cursor.
  1534. Closes an open cursor. All data within the context of the cursor becomes invalid (e.g., all document and composite handles). This function commits changes to documents stored in this cursor with the bulk store option.HTSTATUS return code. Failures include:
  1535.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1536.         HTFAIL_OPEN_DOCUMENTS (cursor contains open documents and force is FALSE).HTSTATUS status;
  1537.         status = htCurClose (cursor, TRUE);htCurOpen, htDocClose, htTermCursor############################
  1538. ObjectDatetime##################
  1539. ObjectDocument##################
  1540. ObjectError#####################
  1541. ObjectField#####################
  1542. ##########################################################
  1543. comphand
  1544.     The composite on which to obtain information.
  1545.     item?
  1546.     One value from an enumeration of composite items. Each item corresponds to a type. The following table lists legal items with their corresponding data types and, where relevant, lengths:?
  1547. constant                    type                    
  1548. HTCOMPINFO_ITEMNAME        char [HTLEN_FIELDNAME + 1]?
  1549.     HTCOMPINFO_ISDIRTY        HTBOOL?
  1550.     HTCOMPINFO_HTDOCHANDLE        HTDOCHANDLE
  1551.     HTCOMPINFO_HTCURSOR        HTCURSOR
  1552.     ITEMNAME obtains the name of the composite item in the document.?
  1553.     ISDIRTY obtains a boolean which indicates whether data has been altered;?
  1554.     HTDOCHANDLE obtains the HiTest document handle containing this composite;
  1555.     HTCURSOR obtains the HiTest cursor in which this composites document was opened.?
  1556.     buffer?
  1557.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  1558. HTSTATUS htCompGetInfo (comphand, item, buffer);
  1559.     HTCOMPHANDLE    comphand;         /* Input */?
  1560.     HTGLOBINFO        item;         /* Input */
  1561.     void            *buffer;         /* Output */?
  1562. comphand
  1563.     The composite containing the font.?
  1564.     font?
  1565.     The Notes font about which to obtain operating system-specific information. If the font is not a standard Notes font, HiTest obtains the information from an internal font item in the composites document.
  1566.     osfont?
  1567.     The operating system-specific font information. The OSFONT is an operating system-specific typedef. Currently only the Windows version of HiTest supports this function, which defines OSFONT as LOGFONT.
  1568. HTSTATUS htCompGetOSFont (comphand, htfont, osfont);
  1569.     HTCOMPHANDLE    comphand;         /* Input */?
  1570.     HTFONT        *font;         /* Input */?
  1571.     OSFONT        *osfont;         /* Output */
  1572. dochand?
  1573.     The document in which to create the composite.?
  1574.     itemname?
  1575.     The item name for the new composite. An item name of NULL or the empty string creates a temporary composite usable as a scratchpad. Closing the containing document destroys a temporary composite.
  1576.     filename?
  1577.     The file to import. Use the fully specified path if the file is not in the working directory.
  1578.     format?
  1579.     The composite import format to use for conversion. Use htCompImportList to obtain a list of available import formats.
  1580.     default_font?
  1581.     The default font to use in the new composite. A value of NULL uses the standard default font.
  1582.     comphand?
  1583.     The buffer to receive the handle to the new composite.?
  1584. HTSTATUS htCompImport (dochand, itemname, filename, format,?
  1585.                      default_font, comphand);?
  1586.     HTDOCHANDLE        dochand;         /* Input */
  1587.     char            *itemname;         /* Input, Optional */
  1588.     char            *filename;         /* Input */
  1589.     char            *format;         /* Input */
  1590.     HTFONT        *default_font;     /* Input, Optional */
  1591.     HTCOMPHANDLE    *comphand;         /* Output */?
  1592. first?
  1593.     Whether to get the first or next composite import format information. TRUE resets the import format list, FALSE simply obtains the next import format in the list. The value is always TRUE on the first call after htInit.
  1594.     format?
  1595.     The buffer to receive the composite import format string. Each format string defines one import format for the htCompImport function. The constant HTLEN_IMPEXPINFO defines the maximum format string length.
  1596.     extensions?
  1597.     The buffer to receive the composite import format file extensions. Commas separate the extensions, which include the period (e.g., .txt,.asc). The constant HTLEN_IMPEXPINFO defines the maximum extension string length.
  1598. HTSTATUS htCompImportList (first, format, extensions);
  1599.     HTBOOL    first;         /* Input */
  1600.     char        *format;         /* Output */
  1601.     char        *extensions;     /* Output, Optional */?
  1602. comphand
  1603.     The composite from which to retrieve text.?
  1604.     first
  1605.     Whether to get the first or next text. TRUE resets the current text location marker, FALSE simply obtains the next text in the composite. The value is always TRUE on the first call for a given composite handle.?
  1606.     word_wrap
  1607.     The character position at which to begin a new line. No lines will extend past this position, and this function moves words which run past this position to the next line. A value of zero results in no word wrapping. When using word wrapping, lines of text returned will not be split across calls to this function.
  1608.     tab_count
  1609.     The number of spaces which replace each tab character. A value of zero directs HiTest to strip tabs from text without replacement. A value of HTCOMP_TAB_KEEP directs HiTest to keep tabs in the text buffer rather than replace them.?
  1610.     newline
  1611.     The string to use in the retrieved text for each newline. A value of NULL directs HiTest to use the default newline string \r\n as the newline delimiter.
  1612.     length?
  1613.     The length of the supplied buffer to receive the text.?
  1614.     buffer?
  1615.     The buffer to receive the text.
  1616.     actual_len?
  1617.     The buffer to receive the length of text placed in the buffer. When using word wrapping, this may be up to one line less than the buffer supplied, even though more text is available.?
  1618. HTSTATUS htCompListText (comphand, first, word_wrap,
  1619.                      tab_spaces, newline, length,
  1620.                      buffer, actual_len);
  1621.     HTCOMPHANDLE    comphand;         /* Input */?
  1622.     HTBOOL        first;        /* Input */
  1623.     HTINT            word_wrap;        /* Input, Optional */
  1624.     HTINT            tab_spaces;     /* Input, Optional */?
  1625.     char            *newline;         /* Input, Optional */?
  1626.     HTINT            length;        /* Input */?
  1627.     char            *buffer;        /* Output */
  1628.     HTINT            *actual_len;    /* Output, Optional */
  1629. maincomp
  1630.     The main composite, into which to merge the added composite (i.e., the composite which is changing).?
  1631.     addcomp
  1632.     The composite to merge into the main composite.
  1633.     index
  1634.     The composite record index in the main composite at which to perform the merge. The first composite record is index one. Use the htComprecCount function to obtain the last index for a particular composite. A value of zero directs HiTest to use the location past the last composite record, resulting in concatenation.?
  1635. HTSTATUS htCompMerge (maincomp, addcomp, index);
  1636.     HTCOMPHANDLE    maincomp;         /* Input */?
  1637.     HTCOMPHANDLE    addcomp;         /* Input */
  1638.     HTINT            index;         /* Input, Optional */?
  1639. comphand
  1640.     The composite which will contain the font.?
  1641.     osfont?
  1642.     The operating system-specific font information. The OSFONT is an operating system-specific typedef. Currently, only the Windows of HiTest supports this function, which defines OSFONT as LOGFONT.?
  1643.     font?
  1644.     The buffer to receive the Notes font.
  1645. HTSTATUS htCompPutOSFont (comphand, osfont, htfont);
  1646.     HTCOMPHANDLE    comphand;         /* Input */?
  1647.     OSFONT        *osfont;         /* Input */?
  1648.     HTFONT        *font;         /* Output */
  1649. Comprec is an abbreviation for composite record. One or more ordered composite records make up a composite. The primary attributes of a composite record are a composite record type, an index, and a value. Currently, HiTest does not support all composite record types available within Lotus Notes, although the common types are supported. Each composite record type is manipulated with a composite record structure prefixed with HTC_.?
  1650. The following constants define PABDEF justification flags in the HTC_PABDEF structure:
  1651. HTPABJUSTIFY_LEFT            Left justification
  1652. HTPABJUSTIFY_RIGHT            Right justification
  1653. HTPABJUSTIFY_FULL            Full (left and right) justification?
  1654. HTPABJUSTIFY_CENTER        Center justification?
  1655. HTPABJUSTIFY_NONE            No word wrap
  1656. The following flags define PABDEF flags in the HTC_PABDEF structure:
  1657. HTPAB_PAGE_BEFORE            Paragraph starts a new page?
  1658. HTPAB_KEEP_WITH_NEXT        Keep with next paragraph
  1659. HTPAB_KEEP_TOGETHER        Don't split lines in paragraph?
  1660. HTPAB_PROPAGATE            Propagate PAGE_BEFORE and KEEP_WITH_NEXT
  1661. HTPAB_HIDE_READ            Hide paragraph in view mode?
  1662. HTPAB_HIDE_EDIT            Hide paragraph in edit mode?
  1663. HTPAB_HIDE_PRINT            Hide paragraph when printing?
  1664. HTPAB_DISPLAY_RIGHT        Honor right margin when displaying?
  1665. HTPAB_HIDE_COPY            Hide paragraph when copying/forwarding
  1666. Use the constant TWIPS_PER_INCH to manipulate HTC_PABDEF margin fields in inches. A TWIP is a term used in Notes as a fraction (1/1440) of an inch.?
  1667. The following flags define DDE and OLE clipboard flags in the HTC_DDE and HTC_OLE structures:?
  1668. HTCLIP_TEXT                Text?
  1669. HTCLIP_METAFILE            Metafile or MetafilePict
  1670. HTCLIP_BITMAP            Bitmap
  1671. HTCLIP_RTF                Rich text format
  1672. The following flags define DDE flags in the HTC_DDE structure:
  1673. HTDDE_HOTLINK            Hot DDE link
  1674. HTDDE_WARMLINK            Warm DDE link
  1675. HTDDE_ISEMBED            Embedded document is used?
  1676. The following flags define OLE flags in the HTC_OLE structure:
  1677. HTOLE_EMBEDDED            Object is an embedded OLE object?
  1678. HTOLE_LINK                Object is an OLE link object
  1679. HTOLE_HOTLINK            The OLE link object is automatic (hot)
  1680. HTOLE_WARMLINK            The OLE link object is manual (warm)?
  1681. The following table describes the composite record types:?
  1682. HTCOMP enumeration
  1683. Description and structure?
  1684. PABDEF
  1685. A Paragraph Attribute Block Definition. A PABDEF defines the format of a paragraph. While multiple paragraphs may use the same PABDEF, each PABDEF normally occurs only once. After each paragraph begins, a PABREF references the proper PABDEF by its identifier (PABID) field. A PABDEF must come before any references to that PABDEF. The structure for an HTCOMP_PABDEF record is an HTC_PABDEF, and contains no variable length component:?
  1686.     typedef struct
  1687.       WORD pabid;            /* ID for this PABDEF */
  1688.       WORD justify;        /* Justification method
  1689.                        (HTPABJUSTIFY_xxx) */
  1690.       WORD linespace;        /* 2 * (line spacing - 1) */?
  1691.       WORD paraspace_before;    /* Linespace units before paragraph */?
  1692.       WORD paraspace_after;    /* Linespace units after paragraph */?
  1693.       WORD left_margin;        /* Left margin, in twips (1/1440 inch)?
  1694.                        Notes default is TWIPS_PER_INCH */?
  1695.       WORD right_margin;    /* Right margin, in twips
  1696.                        Zero means 1" from right edge */?
  1697.       WORD first_left_margin;    /* First line left margin, in twips */
  1698.       WORD tab_count;        /* Number of tab stops in tabs table */
  1699.       short int tabs [20];    /* Tab stops, in twips?
  1700.                        Negative value means decimal tab */
  1701.       WORD flags;            /* PABDEF flags (HTPAB_xxx) */
  1702.     } HTC_PABDEF;            /* Composite record PAB definition */?
  1703. PABREF
  1704. A Paragraph Attribute Block Reference. This record occurs at the beginning of a paragraph and indicates the PABDEF paragraph definition to use for the current paragraph. A paragraph with no PABREF uses the PABDEF from the previous paragraph. A PABREF contains only an identifier indicating the PABDEF to use. The structure for an HTCOMP_PABREF record is an HTC_PABREF, and contains no variable length component:?
  1705.     typedef struct
  1706.       WORD pabid;            /* ID of the PABDEF to reference */?
  1707.     } HTC_PABREF;            /* Composite record PAB reference */
  1708. An indicator to begin a new paragraph. A PARA does not contain any information or value. The textual representation of a PARA is a newline. There is no structure for an HTCOMP_PARA record, since it contains no data.?
  1709. A run of text. Each TEXT value contains a font and a variable length text component. To change fonts, use a new TEXT record. Notes displays consecutive text runs consecutively (e.g., Notes displays the runs ABC and DEF as ABCDEF). Notes can represent a newline within a text record by a NULL character, but usually uses a paragraph record for a newline. Since embedded NULLs within text runs are valid, a NULL terminator cannot be used to determine string length. When storing a text record, a length of zero indicates no text rather than NULL terminated text. When reading text with htComprecFetch, programs should allocate an extra NULL terminator byte, since HiTest adds a NULL after the text run. This NULL is useful for string manipulation of text runs known to contain no NULLs. The text length does not include this NULL, which does not represent a newline. The structure for an HTCOMP_TEXT record is an HTC_TEXT, and contains a variable length component:
  1710.     typedef struct
  1711.       HTFONT font;    /* Text font */
  1712.       HTINT length;    /* Length of data. Zero indicates no text */
  1713.       char *buffer;    /* Pointer to data */?
  1714.     } HTC_TEXT;        /* Composite record text block */
  1715. A catch-all composite record type for unknown composite record types. Manipulation of BLOB contents requires knowledge of the internal structure of composite items defined in the standard Notes API. A BLOB contains variable length data, including the internal composite record signature. Any composite type may be retrieved as a BLOB, which is the only composite conversion allowed. The structure for an HTCOMP_BLOB record is an HTC_BLOB, and contains a variable length component:
  1716.     typedef struct
  1717.       HTINT length;    /* Length of data (including header) */?
  1718.       char *buffer;    /* Pointer to data (including header) */
  1719.     } HTC_BLOB;        /* Generic composite record structure */?
  1720. DOCLINK?
  1721. A Notes doclink. A doclink is a link to another Notes document, or any replica of that document. The document is represented by a cursor, a view ID, and a document handle of the document to which the link points. Additionally, each doclink contains a comment normally constructed by HiTest (of the form Database Db title, View View title, Document Document title). Programs can override this comment by setting the comment and comment_length structure fields when inserting a new doclink record. When accessing a doclink, the read_comment_only field determines whether to access the comment information only or to access the entire doclink. When accessing the entire doclink (read_comment_only = FALSE), HiTest creates both a cursor and document handle which the calling program must close. HiTest ignores the read_comment_only field when creating new doclinks.?
  1722.     typedef struct
  1723.       HTCURSOR cursor;        /* Cursor containing document */
  1724.       HTVIEWID viewid;        /* View to which the link points */?
  1725.       HTDOCHANDLE dochand;    /* Document to which the link points */
  1726.       WORD comment_length;    /* Length of display comment?
  1727.                        Use zero on input for null term */?
  1728.       char *comment;        /* Link comment. If omitted on input
  1729.                        (empty or NULL), built by HiTest */
  1730.       HTBOOL read_comment_only; /* When reading, whether to only
  1731.                         retrieve the comment (TRUE), or to
  1732.                         open the cursor and document handle?
  1733.                         (FALSE) */
  1734.     } HTC_DOCLINK;        /* Composite record doclink */
  1735. A DDE link definition and starting point. A DDE link always begins with a DDE record and must end with a DDE_END record. The DDE data is stored between these records as other composite records. A simple DDE record contains values for the server, topic, and item names; the value HTDDE_HOTLINK for flags, and the value HTCLIP_TEXT for clipboard. If a DDE link contains an embedded document (flag HTDDE_ISEMBED flag, embed_count = 1), then the embedded document name is a variable length component at embed_name. The structure for an HTCOMP_DDE record is an HTC_DDE, and contains a variable length component:
  1736.     typedef struct
  1737.       char server_name [HTLEN_DDE_SERVER];  /* DDE server name */?
  1738.       char topic_name [HTLEN_DDE_TOPIC];    /* DDE topic name */?
  1739.       char item_name [HTLEN_DDE_ITEM];    /* DDE item name */
  1740.       HTINT flags;                /* DDE flags (HTDDE_xxx) */?
  1741.       WORD embed_count;        /* Number of embedded docs (0 or 1) */?
  1742.       WORD clipboard;        /* Clipboard format (HTCLIP_xxx) */
  1743.       WORD embed_length;    /* Length of embedded document name */?
  1744.       char *embed_name;        /* Embedded document name */?
  1745.     } HTC_DDE;            /* Composite record DDE object?
  1746.                        starting point */
  1747. DDE_END?
  1748. An indicator to end a DDE object. It is crucial that every DDE record has a matching DDE_END record. A DDE_END does not contain any information or value. There is no structure for an HTCOMP_DDE_END record, since it contains no data.
  1749. An OLE 1.0 link definition and starting point. An OLE link always begins with an OLE record and must end with an OLE_END record. The OLE data is stored between these records as other composite records. An OLE object is either linked or embedded, and if linked is either a hot or warm link. The OLE file is included in the document as a file attachment. The name_buffer field contains the name of the file attachment. When creating a new OLE record, HiTest automatically attaches the specified file to the document (do not use htFilePut). The file name must be given as a fully specified path. HiTest constructs the filename of the attachment using an internally generated unique number different from the filename submitted by the calling program. The generated filename is stored in the composite record. When retrieving an OLE record, obtain the attached file with the htFileFetch function, using the filename stored in the name buffer. ?
  1750. The name buffer field also stores the optional class and template names, if used. The name buffer is a variable length component consisting of 1-3 strings (file name required, class and template names optional) concatenated together. The lengths of each string are defined in the file_length, class_length, and template_length fields. Strings in the name buffer are not NULL terminated. The structure for an HTCOMP_OLE record is an HTC_OLE, and contains a variable length component:
  1751.     typedef struct
  1752.       HTINT flags;        /* OLE flags (HTOLE_xxx) */?
  1753.       WORD clipboard;        /* Clipboard format (HTCLIP_xxx) */
  1754.       WORD file_length;        /* Length of attached file name -
  1755.                        First string in name_buffer */?
  1756.       WORD class_length;    /* Length of class name (optional) -?
  1757.                        Second string in name_buffer */
  1758.       WORD template_length;    /* Length of template name (optional) -?
  1759.                        Third string in name_buffer */?
  1760.       char *name_buffer;    /* Name buffer containing 1-3 names,?
  1761.                        lengths given in xxx_length fields */
  1762.     } HTC_OLE;            /* Composite record OLE object?
  1763.                        starting point */
  1764. OLE_END?
  1765. An indicator to end an OLE object. It is crucial that every OLE record has a matching OLE_END record. An OLE_END does not contain any information or value. There is no structure for an HTCOMP_OLE_END record, since it contains no data.
  1766. The composite record group contains the following functions:
  1767. htComprecCount        Obtains the number of composite records in a composite
  1768. htComprecDelete        Deletes one or more consecutive composite records from a composite?
  1769. htComprecFetch        Retrieves the data from a composite record
  1770. htComprecGetPtr        Retrieves the values and a data pointer from a composite record
  1771. htComprecInsert        Inserts a single composite record into an existing composite?
  1772. htComprecLength    Obtains the length of the variable length portion of a composite record?
  1773. htComprecList        Iterates through composite records in a composite
  1774. htComprecUpdate    Modifies the contents of a single composite record
  1775. comphand
  1776.     The composite from which to obtain the composite record count.?
  1777.     count
  1778.     The buffer to receive the number of composite records in the composite.
  1779. HTSTATUS htComprecCount (comphand, count);
  1780.     HTCOMPHANDLE    comphand;         /* Input */?
  1781.     HTINT            *count;         /* Output */?
  1782. comphand
  1783.     The composite containing the composite records to delete.
  1784.     start
  1785.     The index of the first composite record to delete. The first index is one. Use htComprecCount to obtain the last valid index.
  1786.     count
  1787.     The number of composite records to delete.?
  1788. HTSTATUS htComprecDelete (comphand, start, count);
  1789.     HTCOMPHANDLE    comphand;         /* Input */?
  1790.     HTINT            start;         /* Input */?
  1791.     HTINT            count;         /* Input */?
  1792. comphand
  1793.     The composite containing the composite record.?
  1794.     index
  1795.     The index of the composite record from which to obtain the data. The first index is one. Use htComprecCount to obtain the last valid index.
  1796.     comptype?
  1797.     The type to fetch the composite record as. This value must be either HTCOMP_BLOB, the type of the composite record, or zero. If this value is zero, HiTest returns the composite records type in this buffer. This type determines the format of the data at compdata.?
  1798.     compdata?
  1799.     The data from the composite record. The data is one of multiple composite record structures (structure names prefixed with HTC_). The value of comptype determines the structure to use (i.e., if comptype is HTCOMP_TEXT, then compdata points to an HTC_TEXT structure). If the composite record structure has variable length data, allocate the buffer and set the pointer in the composite record structure before calling this function. Use htComprecLength to determine the length of the buffer required.?
  1800. HTSTATUS htComprecFetch (comphand, index, comptype,?
  1801.                      compdata);
  1802.     HTCOMPHANDLE    comphand;     /* Input */
  1803.     HTINT            index;     /* Input */
  1804.     HTCOMP        *comptype;     /* Input/Output, Optional */?
  1805.     void            *compdata;     /* Output */
  1806. comphand
  1807.     The composite containing the composite record.?
  1808.     index
  1809.     The index of the composite record from which to obtain the data. The first index is one. Use htComprecCount to obtain the last valid index.
  1810.     comptype?
  1811.     The type to retrieve the composite record as. This value must be either HTCOMP_BLOB, the type of the composite record, or zero. If this value is zero, HiTest returns the composite records type in this buffer. This type determines the format of the data at compdata.
  1812.     compdata?
  1813.     The data from the composite record. The data is one of multiple composite record structures (structure names prefixed with HTC_). The value of comptype determines the structure to use (i.e., if comptype is HTCOMP_TEXT, then compdata points to an HTC_TEXT structure). If the composite record structure has variable length data, then HiTest returns the pointer to this data in the structure. This data should not be modified or freed by the calling program. The pointer becomes invalid at the next HiTest function call.
  1814. HTSTATUS htComprecGetPtr (comphand, index, comptype,
  1815.                       compdata);?
  1816.     HTCOMPHANDLE    comphand;     /* Input */
  1817.     HTINT            index;     /* Input */
  1818.     HTCOMP        *comptype;     /* Input/Output, Optional */?
  1819.     void            *compdata;     /* Output */
  1820. comphand
  1821.     The composite into which to insert the composite record.?
  1822.     index
  1823.     The index at which to insert the composite record. The current composite record at this index will follow the new composite record. The first index is one. Use htComprecCount to obtain the last valid index. A value of zero directs HiTest to append this composite record to the end of the composite -- use index zero in multiple calls to append to a composite.
  1824.     comptype?
  1825.     The composite record type of the new composite record. This type determines the format of the data at compdata.
  1826.     compdata?
  1827.     The data for the new composite record. The data is one of multiple composite record structures (structure names prefixed with HTC_). The value of comptype determines the structure to use (e.g., if comptype is HTCOMP_TEXT, then compdata points to an HTC_TEXT structure).
  1828. HTSTATUS htComprecInsert (comphand, index, comptype,
  1829.                       compdata);?
  1830.     HTCOMPHANDLE    comphand;         /* Input */?
  1831.     HTINT            index;         /* Input, Optional */?
  1832.     HTCOMP        comptype;         /* Input */
  1833.     void            *compdata;         /* Input */
  1834. comphand
  1835.     The composite containing the composite record.?
  1836.     index
  1837.     The index of the composite record whose length is to be determined. The first index is one. Use htComprecCount to obtain the last valid index.?
  1838.     comptype?
  1839.     The buffer to receive the composite record type of the specified composite record. This type determines the format of the data returned by a call to htComprecFetch or htComprecGetPtr.
  1840.     length?
  1841.     The buffer to receive the length of the variable length component. If there is no variable length component, HiTest sets this value to zero.?
  1842. HTSTATUS htComprecLength (comphand, index, comptype,
  1843.                       length);?
  1844.     HTCOMPHANDLE    comphand;         /* Input */?
  1845.     HTINT            index;         /* Input */?
  1846.     HTCOMP        *comptype;         /* Output */
  1847.     HTINT            *length;         /* Output */
  1848. comphand
  1849.     The composite from which to list composite records.
  1850.     first
  1851.     Whether to get the first or next composite record. TRUE resets the composite record list, FALSE simply obtains the next composite record in the list. The value is always TRUE on the first call for a given composite handle.?
  1852.     comptype?
  1853.     Either the composite record type to find, or the buffer to receive the next composite record type. If nonzero, htComprecList finds the next composite record of this type. If zero, htComprecList finds the next composite record and returns its type in this location. To iterate through all composite records, remember to set this value to zero before each call.
  1854.     index
  1855.     The buffer to receive the index of the composite record within the composite. Depending on the use of the comptype parameter, this will either be an incrementing index, or will jump (when finding records of a specific type). This index is useful as input to the various htComp and htComprec functions which require a composite record index.?
  1856. HTSTATUS htComprecList (comphand, first, comptype, index);
  1857.     HTCOMPHANDLE    comphand;     /* Input */
  1858.     HTBOOL        first;     /* Input */
  1859.     HTCOMP        *comptype;     /* Input/Output, Optional */?
  1860.     HTINT            *index;     /* Output */
  1861. comphand
  1862.     The composite containing the composite record to update.?
  1863.     index
  1864.     The index of the composite record to update. The first index is one. Use htComprecCount to obtain the last valid index.
  1865.     comptype?
  1866.     The composite record type of the new composite record. This type determines the format of the data at compdata.
  1867.     compdata?
  1868.     The data for the new composite record. The data is one of multiple composite record structures (structure names prefixed with HTC_). The value of comptype determines the structure to use (e.g., if comptype is HTCOMP_TEXT, then compdata points to an HTC_TEXT structure).
  1869. HTSTATUS htComprecUpdate (comphand, index, comptype,
  1870.                       compdata);?
  1871.     HTCOMPHANDLE    comphand;         /* Input */?
  1872.     HTINT            index;         /* Input */?
  1873.     HTCOMP        comptype;         /* Input */
  1874.     void            *compdata;         /* Input */
  1875. The cursor object has no context beneath the process level. Many of the remaining objects exist within the context of a cursor. Some objects use a cursor directly and some indirectly through a document, which is only valid in the context of its cursor. A cursor represents a session, which includes an open Lotus Notes database and state information. Each process or task can contain multiple cursors at any point in time. Multiple cursors may be open to a single database. All actions performed against a database occur through a cursor.
  1876. A cursors state consists of an active form, an active view, an index, bindings, and open documents. Any operation which cancels or replaces part of a cursors state destroys the previous value. For example, producing a new index destroys the previous index. Any state within the context of a cursor, including documents opened in the cursor, becomes invalid when closing the cursor. A cursor itself is a handle often used as a synonym for the session that it represents. HiTest uses the constant NULLHANDLE to represent an invalid cursor. The primary attributes of a cursor are the same as those of a database plus a handle.?
  1877. The cursor group contains the following functions:
  1878. htCurClose        Closes an open cursor?
  1879. htCurGetInfo        Obtains a piece of information from and about a cursor
  1880. htCurOpen        Opens a HiTest cursor
  1881. htCurReset        Resets the state of a cursor
  1882. htCurSetOption        Assigns the value of a cursor option
  1883. cursor
  1884.     The cursor to close.?
  1885.     force
  1886.     Indicates whether to force open documents in the cursor  to close. If TRUE, HiTest closes and commits any open documents in the cursor with an internal call to htDocClose. If FALSE, any open documents cause the close to fail.
  1887. HTSTATUS htCurClose (cursor, force);
  1888.     HTCURSOR    cursor;         /* Input */?
  1889.     HTBOOL    force;         /* Input */
  1890. cursor
  1891.     The cursor to use.?
  1892.     item?
  1893.     One value from an enumeration of cursor items. Each item corresponds to a type (and length, for variable length types). The following table lists legal items with their corresponding data types and, where relevant, lengths:
  1894. constant                    type                    
  1895. HTCURINFO_SERVERNAME        char [HTLEN_SERVERNAME + 1]?
  1896.     HTCURINFO_FILENAME        char [HTLEN_FILENAME + 1]
  1897.     HTCURINFO_FORMNAME        char [HTLEN_DESIGNNAME + 1]
  1898.     HTCURINFO_VIEWNAME        char [HTLEN_DESIGNNAME + 1]
  1899.     HTCURINFO_DBTITLE            char [HTLEN_DATABASEINFO + 1]
  1900.     HTCURINFO_DBCATEGORIES        char [HTLEN_DATABASEINFO + 1]
  1901.     HTCURINFO_DBTEMPLATE        char [HTLEN_DATABASEINFO + 1]
  1902.     HTCURINFO_DBDESIGNTEMPLATE    char [HTLEN_DATABASEINFO + 1]?
  1903.     HTCURINFO_DBHANDLE        standard Notes API: DBHANDLE?
  1904.     HTCURINFO_DBID            standard Notes API: DBID
  1905.     SERVERNAME obtains the server name on which the database exists;?
  1906.     FILENAME obtains the database file name the cursor represents;?
  1907.     FORMNAME obtains the form name of the active form;?
  1908.     VIEWNAME obtains the view name of the active view;?
  1909.     DBTITLE obtains the database title;
  1910.     DBCATEGORIES obtains the database categories;
  1911.     DBTEMPLATE obtains the database template name;?
  1912.     DBDESIGNTEMPLATE obtains the database design template name;
  1913.     The following items are only useful when combining HiTest calls with calls to the standard Notes API, and should be used carefully:
  1914.     DBHANDLE obtains the standard Notes API database handle
  1915.     DBID obtains the standard Notes API database ID
  1916.     buffer?
  1917.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  1918. HTSTATUS htCurGetInfo (cursor, item, buffer);?
  1919.     HTCURSOR     cursor;         /* Input */
  1920.     HTCURINFO    item;         /* Input */
  1921.     void        *buffer;         /* Output */
  1922. FunctionhtCurGetInfoObtains a piece of information from and about a cursor.
  1923. Fetches one of various cursor-level information items into a supplied buffer. Each item has a data type, and the buffer must be large enough to hold the result.HTSTATUS return code. Failures include:
  1924.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1925.         HTFAIL_ILLEGAL_ENUM (invalid item).char dbtitle [HTLEN_DATABASEINFO + 1];
  1926.         HTSTATUS status;
  1927.         status = htCurGetInfo (cursor, HTCURINFO_DBTITLE, dbtitle);htCurOpenCursor######################################
  1928. FunctionhtCurOpenOpens a HiTest cursor.
  1929. Creates and returns a new cursor. The cursor represents a connection to the indicated database. Multiple cursors may be open at one time, including multiple cursors to a single database. All access to metadata and data within a database occurs through a cursor. Use the function htCurClose to close a cursor.HTSTATUS return code. Failures include:
  1930.         HTFAIL_INVALID_DATABASE (database does not exist).HTCURSOR cursor;
  1931.         HTSTATUS status;
  1932.         status = htCurOpen ("MyServer", "mail\JSmith.nsf", &cursor);htSetOption, htCurCloseCursor##############################
  1933. FunctionhtCurResetResets the state of a cursor.
  1934. Clears the state of a cursor, as relates to the active index. This function performs the following actions:
  1935.         1) clears the formula buffer,
  1936.         2) clears the current (active) index,
  1937.         3) clears all active bindings.HTSTATUS return code. Failures include:
  1938.         HTFAIL_INVALID_CURSOR.HTSTATUS status;
  1939.         status = htCurReset (cursor);htFormulaReset, htFormulaExec, htItemBind, htCellBindCursor##########################
  1940. FunctionhtCurSetOptionAssigns the value of a cursor option.
  1941. Assigns a value to the indicated cursor option. Depending on the option, the new value is supplied in either the number or string parameter.HTSTATUS return code. Failures include:
  1942.         HTFAIL_INVALID_CURSOR (invalid cursor);
  1943.         HTFAIL_ILLEGAL_ENUM (invalid option);
  1944.         HTFAIL_OVERFLOW (value out of bounds).HTSTATUS status;
  1945.         status = htCurSetOption (cursor, HTGLOBOPT_BULK_STORE, TRUE,
  1946.                                          NULL)htCurOpen, htSetOptionCursor###########
  1947. FunctionhtDbGetPathObtains a database filename from a database title.
  1948. This function determines the filename of a database from the databases title by either performing a directory search or scanning the database catalog on a server. The calling program must supply the server name on which the database exists. This function is an inefficient way of finding databases (programs should try to retain database filepaths to avoid needing this function).HTSTATUS return code. Failures include:
  1949.         HTFAIL_INVALID_DATABASE (cannot find database).char dbfile [HTLEN_FILENAME + 1];
  1950.         HTSTATUS status;
  1951.         status = htDbGetPath ("MyServer", "mail", "JSmith.NSF",
  1952.                                     FALSE, dbfile);htDbList, htDbListCatDatabase
  1953. ##########################################################
  1954. FunctionhtDbListIterates through available Notes databases and directories on a given server.
  1955. Returns the first or next database information from the current database list. HiTest obtains the database list with a directory search depending on the input parameters. The database information available from this function consists of the database title and the database filename or filepath. In addition, this function returns directory entries. HiTest uses the values of the search parameters (server, searchdir, and recurse) to produce the database list.HTSTATUS return code. Failures include:
  1956.         HTFAIL_END_OF_DATA (no more results).char dbtitle [HTLEN_DATABASEINFO + 1];
  1957.         char dbfile [HTLEN_FILENAME + 1];
  1958.         HTBOOL isdb;
  1959.         HTLIST list_op = HTLIST_FIRST;
  1960.         printf ("List of Local Notes Databases:");
  1961.         while (!htDbList (NULL, NULL, list_op, FALSE, &isdb,
  1962.                                 dbtitle, dbfile))
  1963.         {
  1964.             if (!isdb)
  1965.                 continue;
  1966.             printf ("\n     Title: '%s',  Filename: '%s' ", dbtitle,
  1967.                         dbfile);
  1968.             list_op = HTLIST_NEXT;
  1969.         }htDbListCat, htSetOptionDatabase#############
  1970. FunctionhtDbListCatIterates through databases in a database catalog.
  1971. Returns the first or next database information for the databases in a database catalog. A database catalog must be available on the selected Notes server.HTSTATUS return code. Failures include:
  1972.         HTFAIL_DATA_UNAVAIL (requested server catalog is unavailable);
  1973.         HTFAIL_END_OF_DATA (no more catalog entries).char dbtitle [HTLEN_DATABASEINFO + 1];
  1974.         char dbfile [HTLEN_FILENAME + 1];
  1975.         HTLIST list_op = HTLIST_FIRST;
  1976.         printf ("List of Databases in Server 'MyServer' Catalog:");
  1977.         while (!htDbListCat ("MyServer", list_op, dbtitle, dbfile))
  1978.         {
  1979.             if (isdb)
  1980.                 printf ("\n     Title: '%s',  Filename: '%s' ",
  1981.                             dbtitle, dbfile);
  1982.             list_op = HTLIST_NEXT;
  1983.         }htDbList, htDbGetPathDatabase#############
  1984. FunctionhtDatetimeCompareRelatively compares two datetimes.
  1985. Compares two datetimes and returns whether the first is greater than, equal to, or less than the second. To determine the absolute difference in time between two datetimes, use the htDatetimeDiff function.HTINT relation of the first and second datetimes. If the first datetime is greater than the second, returns greater than zero. If the first datetime is less than the second, returns less than zero. If the two datetimes are equal, returns zero.HTINT compare;
  1986.         compare = htDatetimeCompare (&datetime1, &datetime2);htDatetimeGetInfo, htDatetimeDiffDatetime######################################################
  1987. FunctionhtDatetimeCreateCreates a datetime from individual components.
  1988. Creates a datetime from individual date and time components. The time zone and daylight savings time status may be provided as input or determined automatically from the Notes installation.HTSTATUS return code. Failures include:
  1989.         HTFAIL_BAD_FORMAT (the timesumm values do not represent a valid datetime).HTDATETIME datetime;
  1990.         HTTIMESUMM timesumm;
  1991.         HTSTATUS status;
  1992.         timesumm.year = 1999;
  1993.         timesumm.month = 12;
  1994.         timesumm.dom = 31;
  1995.         timesumm.hour = 23;
  1996.         timesumm.minute = 59;
  1997.         timesumm.second = 59;
  1998.         timesumm.hundsec = 99;
  1999.         status = htDatetimeCreate (×umm, TRUE, &datetime);htDatetimeGetInfo, htDatetimeUpdateDatetime#######################################
  2000. FunctionhtDatetimeDiffAbsolutely compares two datetimes.
  2001. Compares two datetimes and returns the number of seconds difference between the two. To simply determine which datetime is greater, use the faster htDatetimeCompare function.HTINT number of seconds between the first and second datetimes. If the first datetime is greater than the second, the value is positive. If the first datetime is less than the second, the value is negative. If the two datetimes are equal, returns zero.HTINT seconds;
  2002.         seconds = htDatetimeDiff (&datetime1, &datetime2);htDatetimeGetInfo, htDatetimeCompareDatetime###############
  2003. FunctionhtDatetimeGetInfoObtains a piece of information from and about a datetime.
  2004. Fetches one of various datetime-level information items into a supplied buffer. Each item has a data type, and the buffer must be large enough to hold the result.HTSTATUS return code. Failures include:
  2005.         HTFAIL_BAD_FORMAT (invalid datetime);
  2006.         HTFAIL_ILLEGAL_ENUM (invalid item).HTINT julian;
  2007.         HTSTATUS status;
  2008.         status = htDatetimeGetInfo (&datetime, HTTIMEINFO_JULIAN,
  2009.                                             &julian);htDatetimeCreateDatetime
  2010. ##########################################################
  2011. FunctionhtDatetimeUpdateModifies a datetime to produce a new datetime.
  2012. Modifies the components of a datetime to produce a new datetime.HTSTATUS return code. Failures include:
  2013.         HTFAIL_OVERFLOW (the update would result in an invalid datetime).HTTIMESUMM timesumm;
  2014.         HTSTATUS status;
  2015.         timesumm.year = 1;
  2016.         timesumm.month = 1;
  2017.         timesumm.dom = 1;
  2018.         timesumm.hour = 1;
  2019.         timesumm.minute = 1;
  2020.         timesumm.second = 1;
  2021.         timesumm.hundsec = 1;
  2022.         status = htDatetimeUpdate (×umm, &datetime);htDatetimeCreate, htDatetimeGetInfoDatetime#########################
  2023. FunctionhtDocCloseCloses an open document, optionally discarding all changes.
  2024. Closes a document, invalidating the handle. This function also controls whether to save or discard changes made to the document. Documents not closed with this function are eventually closed by either htCurClose or htTerm, both of which automatically commit changes.HTSTATUS return code. Failures include:
  2025.         HTFAIL_INVALID_DOCUMENT (invalid document handle);htDocClose (dochand, TRUE);htDocOpen, htDocCreate, htCurClose, htTermDocument################################
  2026. FunctionhtDocCopyCopies a document, and optionally its hierarchy, between cursors.
  2027. Creates a copy of the source document in the destination cursor. This function optionally also copies the source documents response hierarchy into the destination cursor.HTSTATUS return code. Failures include:
  2028.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2029.         HTFAIL_INVALID_DOCUMENT (document does not exist);
  2030.         HTFAIL_INVALID_VIEW (view does not exist).HTDOCID new_docid;
  2031.         HTSTATUS status;
  2032.         status = htDocCopy (cursor1, old_docid, cursor2, viewid,
  2033.                                   &new_docid);htDocDelete, htViewGetIdDocument##########################################
  2034. FunctionhtDocCreateCreates a new, empty document.
  2035. Creates and opens a new document in the cursor. Once created, the document behaves like any other document. If bulk storage is active, then this document will not have a valid document ID until the containing cursor is closed.HTSTATUS return code. Failures include:
  2036.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2037.         HTFAIL_FORM_UNAVAIL (strict binding requires an active form).DOCHANDLE dochand;
  2038.         HTSTATUS status;
  2039.         status = htDocCreate (cursor, "Person", &dochand);htDocOpen, htDocCloseDocument###################################################
  2040. FunctionhtDocDeleteDeletes a document, and optionally its hierarchy.
  2041. Deletes the indicated document. This function optionally also deletes the documents response hierarchy.HTSTATUS return code. Failures include:
  2042.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2043.         HTFAIL_INVALID_DOCUMENT (document does not exist);
  2044.         HTFAIL_INVALID_VIEW (view does not exist).HTSTATUS status;
  2045.         status = htDocDelete (cursor, docid, viewid);htViewGetId, htDocCopyDocument##################
  2046. FunctionhtDocFetchOpens the next document in the active index, and loads all bound data.
  2047. Loads all bound data from the next document in the active index. Bound data consists of all items and cells bound since the last htFormulaExec. Use this function when loading the same data from multiple documents in an index. This function performs a document open, data access of multiple items and cells, and automatic conversion as one operation. The document remains open as long as it is the current document in the active index. During this time, the document handle returned from this function is a valid document handle. HiTest closes the document handle when navigating within the index or destroying the index.
  2048.         If the cursor option FETCH_SUMMARY is active, only summary document items are available. This is more efficient than loading non-summary data, but prevents access to composite items and some other large items. The global option TEXT_TRUNCATE causes automatic truncation of data retrieved as text to fit in buffers bound with insufficient lengths. Other retrievals (to types other than text, or to text when TEXT_TRUNCATE is inactive) do not allow truncation. If there are no bound items (i.e., only cells), then the document is not opened, and the document handle is unavailable.
  2049.         Use this function with htDocUpdate to allow easy modification and updating of multiple bound items.HTSTATUS return code. Failures include:
  2050.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2051.         HTFAIL_DATA_UNAVAIL (no active index);
  2052.         HTFAIL_OVERFLOW (data does not fit in bound buffer).HTDOCHANDLE dochand;
  2053.         HTSTATUS status;
  2054.         status = htDocFetch (cursor, &dochand);htSetOption, htCurReset, htFormulaExec, htIndexNavigate, htItemBind, htCellBind, htDocUpdateDocument####################################
  2055. FunctionhtDocGetInfoObtains a piece of information from and about an open document.
  2056. Fetches one of various document-level information items into a supplied buffer. Each item has a data type, and the buffer must be sufficiently large to hold the result.HTSTATUS return code. Failures include:
  2057.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  2058.         HTFAIL_ILLEGAL_ENUM (invalid item).HTDATETIME last_mod;
  2059.         HTSTATUS status;
  2060.         status = htDocGetInfo (dochand, HTDOCINFO_LASTMODIFIED,
  2061.                                      &last_mod);htDocFetch, htDocOpen, htDocCreateDocument#####################
  2062. ObjectFile######################
  2063. ObjectFont######################
  2064. ObjectForm######################
  2065. server
  2066.     The server on which to open the database. To open a local database, use either NULL, the empty string, or the string assigned as the local server name with htSetOption.?
  2067.     Datapath?
  2068.     The file name and path relative to the Notes data directory of the database to open.?
  2069.     cursor?
  2070.     The buffer to receive the new cursor on successful operation.
  2071. HTSTATUS htCurOpen (server, datapath, cursor);
  2072.     char        *server;         /* Input, Optional */?
  2073.     char        *datapath;         /* Input */ 
  2074.     HTCURSOR    *cursor;         /* Output */?
  2075. cursor
  2076.     The cursor to reset.?
  2077. HTSTATUS htCurReset (HTCURSOR cursor);
  2078.     HTCURSOR    cursor;         /* Input */?
  2079. cursor
  2080.     The cursor to use.?
  2081.     option?
  2082.     One value from an enumeration of cursor options. Each option corresponds to either a string or integer value. This option indicates whether to use the string or numeric parameter (HiTest ignores the other parameter). The following table lists legal options with their corresponding data types, parameters, and defaults:
  2083. constant                    type        parameter    default
  2084. HTCUROPT_BULK_STORE        HTBOOL    number    FALSE
  2085.     HTCUROPT_STRICT_BIND        HTBOOL    number    TRUE?
  2086.     HTCUROPT_VIEW_POSITION        HTBOOL    number    FALSE
  2087.     HTCUROPT_FETCH_SUMMARY        HTBOOL    number    FALSE
  2088.     HTCUROPT_SUMMARY_LIMIT        HTINT        number    8192?
  2089.     See the htSetOption function for a description of the options.?
  2090.     number?
  2091.     The numeric or boolean value for an option. When setting the value of a boolean option, use the constants TRUE and FALSE.
  2092.     string?
  2093.     The string value for an option.
  2094. HTSTATUS htSetOption (cursor, option, number, string);
  2095.     HTCURSOR    cursor;         /* Input */?
  2096.     HTGLOBOPT    option;         /* Input */
  2097.     HTINT        number;         /* Input, Optional */?
  2098.     char         *string;         /* Input, Optional */
  2099. The database object has no context beneath the process level, but represents Lotus Notes databases as distinct objects. The primary attributes of a database are the server name, database name, and database file path (relative to the Notes data directory).?
  2100. A database is a file used by Notes to store data in the form of documents. A database also contains metadata in the form of forms, views, and macros. A database can be accessed directly or through a Notes server. When accessed directly, Notes security is bypassed. When accessed through a Notes server, security is imposed, and the server properly handles multiple connections to a database.?
  2101. The database group contains the following functions:
  2102. htDbGetPath        Obtains a database filename from a database title
  2103. htDbList        Iterates through available Notes databases and directories on a given server
  2104. htDbListCat        Iterates through databases in a database catalog?
  2105. server
  2106.     The server on which the database is located. To perform a local search, use either NULL, the empty string, or the string assigned as the local server name with htSetOption.?
  2107.     directory
  2108.     The directory to search for databases, relative to the Notes data directory. To search the data directory itself, use either NULL or the empty string. Catalog searches ignore this parameter (see catalog parameter).?
  2109.     title
  2110.     The title of the database to find. If two databases have the same title, this function will only find the first one.?
  2111.     catalog
  2112.     Whether to perform a catalog search or a directory search. If TRUE, HiTest searches the database catalog (CATALOG.NSF) on the server for the title. If FALSE, HiTest performs a directory search in the directory indicated by the directory parameter.
  2113.     datapath?
  2114.     A character buffer which receives the database file name and path relative to the Notes data directory. The constant HTLEN_FILENAME defines the maximum datapath length.?
  2115. HTSTATUS htDbGetPath (server, directory, title, catalog,
  2116.                     datapath);
  2117.     char        *server;         /* Input, Optional */?
  2118.     char        *directory;     /* Input, Optional */?
  2119.     char        *title;         /* Input */
  2120.     HTBOOL    catalog;         /* Input */
  2121.     char        *datapath;         /* Output */
  2122. server
  2123.     The server from which to obtain the database list. To perform a local search, use either NULL, the empty string, or the string assigned as the local server name with htSetOption.?
  2124.     searchdir
  2125.     The directory to search for databases, relative to the Notes data directory. To search the data directory itself, use either NULL or the empty string.?
  2126.     operation
  2127.     An element of the HTLIST enumeration that indicates whether and how to reset the database list. Use HTLIST_REFRESH to discard the database list and obtain a new list from Notes. If operation is HTLIST_FIRST and any of the search parameters are different from the values used in the previous search, then HiTest produces a new list using the new parameters. Then HiTest sets the next element in the list to the first element. Use HTLIST_NEXT to obtain the element following the last fetched element (HiTest ignores search parameters). The first call to this function following htInit always uses the value HTLIST_REFRESH.?
  2128.     recurse
  2129.     Indicates whether to perform a recursive or flat search. A recursive search (TRUE) obtains all databases in or under the search directory. A nonrecursive search (FALSE) obtains databases and subdirectories in the search directory.?
  2130.     isdatabase?
  2131.     A boolean buffer set to TRUE if the current item is a database, and FALSE if the current item is a directory. For a recursive search, this value is always TRUE.?
  2132.     database?
  2133.     A character buffer which receives the database title. This will be the empty string for a directory. The constant HTLEN_DATABASEINFO defines the maximum title length.?
  2134.     datafile?
  2135.     A character buffer which receives the database file. When performing a nonrecursive search, this buffer receives the filename only, and not the path. When performing a recursive search, this buffer receives the full file name and path relative to the Notes data directory. The constant HTLEN_FILENAME defines the maximum datafile length.
  2136. HTSTATUS htDbList (server, searchdir, operation, recurse,?
  2137.                  isdatabase, database, datafile);?
  2138.     char        *server;         /* Input, Optional */?
  2139.     char        *searchdir;     /* Input, Optional */?
  2140.     HTLIST    operation;         /* Input */
  2141.     HTBOOL    recurse;         /* Input */
  2142.     HTBOOL    *isdatabase;     /* Output, Optional */
  2143.     char        *database;         /* Output, Optional */
  2144.     char        *datafile;         /* Output, Optional */
  2145. server
  2146.     The server on which to examine the database catalog. To use the local database catalog, use either NULL, the empty string, or the string assigned as the local server name with htSetOption. There must be a database catalog CATALOG.NSF in the Notes data directory on the server.?
  2147.     operation
  2148.     An element of the HTLIST enumeration that indicates whether and how to reset the database list. Use HTLIST_REFRESH to discard the database list and obtain a new list from the database catalog. If operation is HTLIST_FIRST and the server name is different from the value used in the previous search, then HiTest uses the new servers catalog. Then HiTest sets the next element in the list to the first element. Use HTLIST_NEXT to obtain the element following the last fetched element (HiTest ignores search parameters). The first call to this function following htInit always uses the value HTLIST_REFRESH.?
  2149.     database?
  2150.     A character buffer which receives the database title. HiTest returns the empty string for a directory. The constant HTLEN_DATABASEINFO defines the maximum title length.?
  2151.     datapath?
  2152.     A character buffer which receives the database file name and path relative to the Notes data directory. The constant HTLEN_FILENAME defines the maximum datapath length
  2153. HTSTATUS htDbListCat (server, operation, database,
  2154.                     datapath);
  2155.     char        *server;         /* Input, Optional */?
  2156.     HTLIST    operation;         /* Input */
  2157.     char        *database;         /* Output, Optional */
  2158.     char        *datapath;         /* Output, Optional */
  2159. Use Datetime functions to access and manipulate the components of datetime items. These functions allow simple control of datetime data. The internal structure of a datetime is not accessible to API programs.
  2160. The following structure represents a datetime, but should not be manipulated directly?
  2161. typedef struct
  2162.   DWORD innards [2];
  2163. } HTDATETIME;        /* Datetime structure */?
  2164. Use the following structure to create, access, and update datetimes on a by-component basis?
  2165. typedef struct
  2166.   short int year;        /* Year (1-32767) */?
  2167.   short int month;    /* Month (1-12) */?
  2168.   short int dom;        /* Day of month (1-31) */?
  2169.   short int weekday;    /* Day of week (1-7 where Sunday = 1) */?
  2170.   short int hour;        /* Hour (0-23) */
  2171.   short int minute;    /* Minute (0-59) */?
  2172.   short int second;    /* Second (0-59) */?
  2173.   short int hundsec;    /* Hundredths of second (0-99) */
  2174.   HTBOOL dst;        /* Whether daylight savings is in effect */
  2175.   short int zone;        /* Time zone (-11 to 11) */ ?
  2176. } HTTIMESUMM;        /* Datetime component structure */?
  2177. The datetime group contains the following functions:
  2178. htDatetimeCompare    Relatively compares two datetimes?
  2179. htDatetimeCreate        Creates a datetime from individual components?
  2180. htDatetimeDiff        Absolutely compares two datetimes?
  2181. htDatetimeGetInfo    Obtains a piece of information from and about a datetime
  2182. htDatetimeUpdate    Modifies a datetime to produce a new datetime
  2183. datetime1?
  2184.     A pointer to the first datetime. 
  2185.     datetime2
  2186.     A pointer to the second datetime. ?
  2187. HTINT htDatetimeCompare (datetime1, datetime2);?
  2188.     HTDATETIME        *datetime1;        /* Input */?
  2189.     HTDATETIME        *datetime2;        /* Input */?
  2190. timesumm
  2191.     A pointer to the structure containing the datetime components. This function ignores the weekday field.
  2192.     autozone?
  2193.     Whether to determine automatically the time zone and daylight savings time status from the Notes installation. A value of TRUE ignores these components in the timesumm structure and automatically determines them. A value of FALSE uses the values in the timesumm structure.?
  2194.     datetime?
  2195.     The buffer to receive the new datetime value.
  2196. HTSTATUS htDatetimeCreate (timesumm, autozone, datetime);?
  2197.     HTTIMESUMM        *timesumm;        /* Input */
  2198.     HTBOOL        autozone;        /* Input */?
  2199.     HTDATETIME        *datetime;        /* Output */?
  2200. datetime1?
  2201.     A pointer to the first datetime. 
  2202.     datetime2
  2203.     A pointer to the second datetime. ?
  2204. HTINT htDatetimeDiff (datetime1, datetime2);
  2205.     HTDATETIME        *datetime1;        /* Input */?
  2206.     HTDATETIME        *datetime2;        /* Input */?
  2207. datetime
  2208.     The datetime to use.?
  2209.     item?
  2210.     One value from an enumeration of datetime items. Each item corresponds to a type (and length, for variable length types). The following table lists legal items with their corresponding data types and, where relevant, lengths:
  2211. constant                    type                    
  2212. HTTIMEINFO_JULIAN            HTINT?
  2213.     HTTIMEINFO_TICKS            HTINT?
  2214.     HTTIMEINFO_HTTIMESUMM        HTTIMESUMM
  2215.     JULIAN obtains the julian date from the date component of the datetime;
  2216.     TICKS obtains the number of ticks (hundredths of a second) since midnight;?
  2217.     HTTIMESUMM obtains the datetime components.
  2218.     buffer?
  2219.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  2220. HTSTATUS htDatetimeGetInfo (datetime, item, buffer);
  2221.     HTDATETIME     datetime;         /* Input */
  2222.     HTTIMEINFO    item;         /* Input */?
  2223.     void        *buffer;         /* Output */
  2224. timesumm
  2225.     A pointer to the structure containing the modifications. HiTest adds the value of each component to the datetime (e.g., a month field of two increases the month of the datetime by two). This function ignores the weekday, time zone, and daylight savings time status.
  2226.     datetime?
  2227.     A pointer to the datetime to update. 
  2228. HTSTATUS htDatetimeUpdate (timesumm, datetime);?
  2229.     HTTIMESUMM        *timesumm;        /* Input */
  2230.     HTDATETIME        *datetime;        /* Input, Output */
  2231. Documents are the primary components of databases. Each document in turn contains items. Each document has a document ID which is unique within the documents database. Use this ID to reference individual documents. Sets of documents may be obtained from an index, which is produced by executing a formula. The primary attribute of a document is the document ID.?
  2232. To access or manipulate the contents of a document, the document must be opened. HiTest represents an open document by a document handle. A document handle is valid until closing either the document itself or the cursor containing the open document. HiTest uses the constant NULLHANDLE to represent an invalid document handle.
  2233. The document group contains the following functions:
  2234. htDocClose        Closes an open document, optionally discarding all changes
  2235. htDocCopy        Copies a document, and optionally its hierarchy, between cursors?
  2236. htDocCreate        Creates a new, empty document
  2237. htDocDelete        Deletes a document, and optionally its hierarchy?
  2238. htDocFetch        Opens the next document in the active index, and loads all bound data?
  2239. htDocGetInfo        Obtains a piece of information from and about an open document
  2240. htDocOpen        Opens a document for data access or modification?
  2241. htDocPut        Creates a new document from bound items?
  2242. htDocUpdate        Updates modifications to bound items back to the last fetched document?
  2243. dochand?
  2244.     Handle of the document to close.?
  2245.     commit?
  2246.     Whether to save changes. If FALSE, HiTest discards all changes to the document. If TRUE and there are changes to document items, then HiTest saves those changes into the database.
  2247. HTSTATUS htDocClose (dochand, commit);
  2248.     HTDOCHANDLE        dochand;         /* Input */
  2249.     HTBOOL        commit;         /* Input */
  2250. src_cursor
  2251.     The cursor containing the source document.?
  2252.     src_docid
  2253.     The document to copy.
  2254.     dest_cursor
  2255.     The cursor into which to copy the document.
  2256.     viewid?
  2257.     This parameter determines whether to perform a hierarchy copy. Use NULLID to copy the source document only. To copy a document and its entire response hierarchy, use the HTVIEWID of the view containing the document and the hierarchy. When copying a single document, using a view reduces performance.
  2258.     dest_docid?
  2259.     The buffer to receive the document ID for the new copy of the source document.?
  2260. HTSTATUS htDocCopy (src_cursor, src_docid, dest_cursor,?
  2261.                   view_docid, dest_docid);
  2262.     HTCURSOR    src_cursor;     /* Input */
  2263.     HTDOCID    src_docid;         /* Input */?
  2264.     HTCURSOR    dest_cursor;     /* Input */?
  2265.     HTVIEWID    viewid;         /* Input, Optional */?
  2266.     HTDOCID    *dest_docid;     /* Output, Optional */?
  2267. cursor
  2268.     The cursor in which to create the new document.
  2269.     formname?
  2270.     The form to use for the new document. A form is required when strict binding is in effect.?
  2271.     dochand
  2272.     The buffer to receive the new document handle. Use htDocClose to close the new document.?
  2273. HTSTATUS htDocCreate (cursor, formname, dochand);?
  2274.     HTCURSOR        cursor;         /* Input */
  2275.     char            *formname;         /* Input, Optional */
  2276.     HTDOCHANDLE        *dochand;         /* Output */
  2277. cursor
  2278.     The cursor containing the document.
  2279.     docid
  2280.     The document to delete.
  2281.     viewid?
  2282.     This parameter determines whether to perform a hierarchy delete. Use NULLID to delete the indicated document only. To delete a document and its entire response hierarchy, use the HTVIEWID of the view containing the document and the hierarchy. When copying a single document, using a view reduces performance.?
  2283. HTSTATUS htDocDelete (cursor, docid, viewid);?
  2284.     HTCURSOR    cursor;         /* Input */?
  2285.     HTDOCID    docid;         /* Input */?
  2286.     HTVIEWID    viewid;         /* Input, Optional */?
  2287. cursor
  2288.     The cursor containing the relevant index.
  2289.     dochand
  2290.     The buffer to receive the fetched documents handle. When fetching a document, the document remains opened as long as it is the current entry in the index (i.e., until index navigation or destruction). HiTest closes the document (and reuses the document handle) when it is no longer the current index entry. If there are no bound items, the document is not opened (this buffer receives the value NULLHANDLE).
  2291. HTSTATUS htDocFetch (cursor, dochand);
  2292.     HTCURSOR        cursor;         /* Input */
  2293.     HTDOCHANDLE        *dochand;         /* Output, Optional */
  2294. dochand?
  2295.     The document on which to obtain information.?
  2296.     item?
  2297.     One value from an enumeration of document items. Each item corresponds to a type (and length, for variable length types). The following table lists legal items with their corresponding data types and, where relevant, lengths:
  2298. constant                type                        
  2299. HTDOCINFO_CREATED        HTDATETIME?
  2300.     HTDOCINFO_LASTMODIFIED    HTDATETIME
  2301.     HTDOCINFO_FORMNAME    char [HTLEN_DESIGNNAME + 1]?
  2302.     HTDOCINFO_TITLELENGTH    HTINT
  2303.     HTDOCINFO_TITLESTRING    char [HTDOCINFO_TITLELENGTH + 1]?
  2304.     HTDOCINFO_ISDIRTY        HTBOOL
  2305.     HTDOCINFO_HTDOCID        HTDOCID?
  2306.     HTDOCINFO_HTCURSOR    HTCURSOR
  2307.     HTDOCINFO_FILECOUNT    HTINT
  2308.     HTDOCINFO_NOTEID        Standard Notes API: NOTEID?
  2309.     HTDOCINFO_NOTEHANDLE    Standard Notes API: NOTEHANDLE
  2310.     CREATED obtains the documents original creation time;
  2311.     LASTMODIFIED obtains the documents last modified time;?
  2312.     FORMNAME obtains the documents form name, if any;
  2313.     TITLELENGTH obtains the length of the document window title;?
  2314.     TITLESTRING obtains the document window title;?
  2315.     ISDIRTY obtains a boolean which indicates whether data has been altered;?
  2316.     HTDOCID obtains the HiTest document ID;
  2317.     HTCURSOR obtains the HiTest cursor in which this document was opened;
  2318.     FILECOUNT obtains the number of file attachments in the document.
  2319.     Use the following items carefully, since they are only useful when integrating HiTest calls with calls to the standard Notes API:
  2320.     NOTEID obtains the standard Notes API note ID;?
  2321.     NOTEHANDLE obtains the standard Notes API note handle.?
  2322.     The document window title has some special properties. To provide a buffer of sufficient size, predetermine the length by calling the function htDocGetInfo with the HTDOCINFO_TITLELENGTH item. Additionally, some window titles may contain view-specific results (e.g., number of responses). If this document is the current document in the active view-based index, then the title includes the view information (otherwise, this function deletes view-specific information from the title string).?
  2323.     buffer?
  2324.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  2325. HTSTATUS htDocGetInfo (dochand, item, buffer)?
  2326.     HTDOCHANDLE        dochand;         /* Input */
  2327.     HTGLOBINFO        item;         /* Input */
  2328.     void            *buffer;         /* Output */?
  2329. cursor
  2330.     The cursor containing the document.
  2331.     docid
  2332.     The document to open.
  2333.     summary
  2334.     Whether to load only summary items. Composite items are never summary items, and other items usually are (this is not always true, since a document may contain no more than 15K of summary data). If this parameter is TRUE, then only summary items will be available from this document. If FALSE, then all document items will be available. Do not load non-summary objects unless required, since they are often large.
  2335.     dochand
  2336.     The buffer to receive the new document handle. This handle is valid until the document or the containing cursor is closed.?
  2337. HTSTATUS htDocOpen (cursor, docid, objects, dochand);?
  2338.     HTCURSOR        cursor;         /* Input */
  2339.     HTDOCID        docid;         /* Input */
  2340.     HTBOOL        summary;        /* Input */
  2341.     HTDOCHANDLE        *dochand;         /* Output */
  2342. FunctionhtDocOpenOpens a document for data access or modification.
  2343. Opens a document and returns a handle. Use this handle in other HiTest functions to obtain and modify data in the document. Close the document with htDocClose to store or discard changes to the document data. The cursors active form has no relevance for documents opened with this function -- the document uses its own form.
  2344.         Use this method of data access when handling single or multiple documents inconsistently. Use htDocFetch when performing the same actions on multiple documents in an index.HTSTATUS return code. Failures include:
  2345.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2346.         HTFAIL_INVALID_DOCUMENT (document does not exist).HTDOCHANDLE dochand;
  2347.         HTSTATUS status;
  2348.         status = htDocOpen (cursor, docid, TRUE, &dochand);htDocClose, htDocFetch, htDocGetInfo, htIndexNavigate,  htCurCloseDocument#####################################
  2349. FunctionhtDocPutCreates a new document from bound items.
  2350. Creates a new document and new items in that document from bound items. All bound items (not bound cells) are converted and stored in the new document. If strict binding is in effect, then the new document uses the active form. If this is the first call to htDocPut since a call to htFormTemplate, then this document uses a form template from htFormTemplate. In this case, form creation of the virtual form precedes the new documents creation. The created form has the same fields as the documents items.HTSTATUS return code. Failures include:
  2351.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2352.         HTFAIL_FORM_UNAVAIL (strict binding requires an active form).HTDOCID docid;
  2353.         HTSTATUS status;
  2354.         status = htDocPut (cursor, &docid);htCurReset, htItemBindDocument########################################
  2355. FunctionhtDocUpdateUpdates modifications to bound items back to the last fetched document.
  2356. Updates certain bound items back to the previously fetched document. This function is only valid following a htDocFetch, and while the fetched document is still the current document in the active index. This function copies into the document any modifications to bound items in memory. Modifications include not only the item data, but also any bound length and null indicators). This function only updates an item if the items bound update boolean assigned with htItemBind is set to TRUE.HTSTATUS return code. Failures include:
  2357.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2358.         HTFAIL_DATA_UNAVAIL (no open fetched document from an active index).HTSTATUS status;
  2359.         status = htDocUpdate (cursor);htIndexNavigate, htDocFetch, htItemBind, htCurResetDocument#############
  2360. FunctionhtErrorFetchObtains the current error information.
  2361. Obtains the information for any error produced by the most recent HiTest function call. This information consists of an error status code, an error severity, and an error message. When an error occurs, the error information is accessible until the next HiTest call (excluding htError functions), at which time HiTest resets the error information.HTINT error string length. Returns zero if there is no current error or the message parameter is NULL.char message [HTLEN_ERROR + 1];
  2362.         HTINT length;
  2363.         HTSTATUS status;
  2364.         HTSEVERITY severity;
  2365.         length = htErrorFetch (0, &status, &severity, &message);htErrorSetBuffer, htErrorSetProcError###########################
  2366. FunctionhtErrorSetBufferSets writeback buffers to receive error information on any HiTest error.
  2367. Sets writeback buffers which will automatically receive the error string, error status code, and error severity when a HiTest function generates an error. If there is an assigned error callback function (by htErrorSetProc), then HiTest writes the error information to the writeback buffers before calling the callback function. Normally, using both writeback buffers and a callback function is unnecessary.void.char error [HTLEN_ERROR + 1];
  2368.         HTSTATUS status;
  2369.         HTSEVERITY severity;
  2370.         htErrorSetBuffer (HTLEN_ERROR, error, &status, &severity);htErrorFetch, htErrorSetProcError####################################################
  2371. FunctionhtErrorSetProcAssigns an error callback function.
  2372. Assigns an error callback function. When a HiTest function generates an error, HiTest calls the callback function before the HiTest function returns. If there are assigned error writeback buffers (by htErrorSetBuffer), then HiTest writes the error information to the writeback buffers before calling the callback function. Normally, using both writeback buffers and a callback function is unnecessary.HTERRORPROC pointer to the callback function prior to this function call. Returns NULL if there was no previous callback function.HTSTATUS HTAPIERR HiTestErrorProc (HTSTATUS code,
  2373.                                                      HTSEVERITY severity,
  2374.                                                      char far *errmsg,
  2375.                                                      void far *buffer);
  2376.         HTERRORPROC old_errorproc;
  2377.         old_errorproc = htErrorSetProc (HiTestErrorProc, context);htErrorFetch, htErrorSetBufferError######
  2378. 4Q!3'$
  2379. FunctionhtFieldCountObtains the number of fields in a form.
  2380. Obtains the number of fields in the indicated form.HTSTATUS return code. Failures include:
  2381.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2382.         HTFAIL_INVALID_FORM (form does not exist).HTINT fieldcount;
  2383.         HTSTATUS status;
  2384.         status = htFieldCount (cursor, formid, fieldcount);htFormGetId, htFieldListField###########################################
  2385. FunctionhtFieldGetInfoObtains a piece of information about a form field.
  2386. Fetches one of various field information items into a supplied buffer. Each item has a data type, and the buffer must be sufficiently large to hold the result. To obtain either the field description or field keywords list, determine the required buffer length from the fields HTFIELD structure. Lengths of zero indicate that the information is not used for the field. HiTest returns keywords as a text list (see the htTextList functions).HTSTATUS return code. Failures include:
  2387.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2388.         HTFAIL_INVALID_FORM (form does not exist);
  2389.         HTFAIL_INVALID_FIELD (no such field in the form);
  2390.         HTFAIL_ILLEGAL_ENUM (invalid item).HTFIELD htfield;
  2391.         HTSTATUS status;
  2392.         status = htFieldGetInfo (HTFIELDINFO_HTFIELD, &field);htFormGetId, htFieldListField###################################################
  2393. FunctionhtFieldListIterates through fields in a form.
  2394. Returns the first or next field information from the list of fields in the form.HTSTATUS return code. Failures include:
  2395.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2396.         HTFAIL_INVALID_FORM (form does not exist);
  2397.         HTFAIL_END_OF_DATA (no more fields).HTFIELD field;
  2398.         HTSTATUS status;
  2399.         status = htFieldList (cursor, FALSE, &field);htFormGetId, htFieldCount, htFieldGetInfoField###############################
  2400. FunctionhtFileDeleteDeletes a file attachment from a document.
  2401. Deletes a file attachment from a document. Notes represents file attachments by file name and extension, not the full path.HTSTATUS return code. Failures include:
  2402.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  2403.         HTFAIL_INVALID_FILE_ITEM (no such file attachment in the document).HTSTATUS status;
  2404.         status = htFileDelete (dochand, "filename.txt");htFileList, htFilePutFile#############################
  2405. FunctionhtFileFetchExtracts a file attachment from a document to a file.
  2406. Extracts a file attachment from a document to an operating system file. A directory into which to extract the file may be specified.HTSTATUS return code. Failures include:
  2407.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  2408.         HTFAIL_INVALID_FILE_ITEM (no such file attachment in the document).
  2409.         HTFAIL_INVALID_DIRECTORY (extraction directory is invalid).HTSTATUS status;
  2410.         status = htFileFetch (dochand, "C:\NOTES", "filename.txt")htFileListFile#######
  2411. FunctionhtFileListIterates through file attachments in a document.
  2412. Returns the first or next file attachment filename from the list of file attachments in the document. Use this filename with the other htFile functions to manipulate file attachments.HTSTATUS return code. Failures include:
  2413.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  2414.         HTFAIL_END_OF_DATA (no more files).char filename [HTLEN_FILENAME + 1];
  2415.         HTSTATUS status;
  2416.         status = htFileList (dochand, FALSE, filename);htFileFetchFile############################
  2417. FunctionhtFilePutAttaches a file to a document.
  2418. Attaches a file to a document. Once attached, Notes represents file attachments by file name and extension, not the full path.HTSTATUS return code. Failures include:
  2419.         HTFAIL_INVALID_DOCUMENT (invalid document handle).HTSTATUS status;
  2420.         status = htFilePut (dochand, "C:\WINDOWS\NOTES.INI");htFileFetch, htFileDeleteFile############################################
  2421. ObjectFormula###################
  2422. FunctionhtFormCopyCopies a form from one cursor to another.
  2423. Copies a form between cursors, optionally assigning a new name. Notes requires form names within a database to be unique.HTSTATUS return code. Failures include:
  2424.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2425.         HTFAIL_INVALID_FORM (source form does not exist);
  2426.         HTFAIL_DUPLICATE (a form exists in the destination cursor with the same title);
  2427.         HTFAIL_OVERFLOW (new form title is too long).HTFORMID new_formid;
  2428.         HTSTATUS status;
  2429.         status = htFormCopy (cursor1, formid, cursor2, "NewForm",
  2430.                                    &new_formid);htFormGetId, htFormDeleteForm######################
  2431. FunctionhtFormDeleteDeletes a form from a database.
  2432. Deletes a form from a database. A cursors active form cannot be deleted.HTSTATUS return code. Failures include:
  2433.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2434.         HTFAIL_INVALID_FORM (form does not exist);
  2435.         HTFAIL_ACTIVE_RESULT (cannot delete the active form).HTSTATUS status;
  2436.         status = htFormDelete (cursor, formid);htFormGetId, htFormCopy, htFormSetForm
  2437. ##########################################################
  2438. FunctionhtFormGetAttribObtains the attributes of a form.
  2439. Obtains complete attributes for a form.HTSTATUS return code. Failures include:
  2440.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2441.         HTFAIL_INVALID_FORM (form does not exist).HTFORM form;
  2442.         HTSTATUS status;
  2443.         status = htFormGetAttrib (cursor, formid, form);htFormList, htFormGetIdForm####
  2444. FunctionhtFormGetIdObtains a form ID from the form name.
  2445. Given a form name, obtains the form ID of the indicated form.HTFORMID for the requested form. Returns NULLID if the form does not exist.HTFORMID formid;
  2446.         formid = htFormGetId (cursor, "Memo");htFormList, htFormGetAttribForm########
  2447. FunctionhtFormListIterates through forms in a database.
  2448. Returns the first or next form summary information from the list of forms in the cursors database.HTSTATUS return code. Failures include:
  2449.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2450.         HTFAIL_END_OF_DATA (no more forms).HTFORMSUMM formsumm;
  2451.         HTSTATUS status;
  2452.         status = htFormList (cursor, HTLIST_NEXT, &formsumm);htFormGetAttribForm############
  2453. FunctionhtFormSetAssigns the active form for a cursor.
  2454. Sets the active form for a cursor, which is required when strict binding is in effect to filter results. When producing a flat index, the index only includes documents of this form. When loading or storing items, the items must exist in this form and be of the proper type. The active form is only used when strict binding is in effect. Use the htCurGetInfo function to obtain a cursors active form. This function is invalid in a cursor containing an active index.HTSTATUS return code. Failures include:
  2455.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2456.         HTFAIL_INVALID_FORM (form does not exist);
  2457.         HTFAIL_ACTIVE_RESULT (cannot set the active form with an active index)HTSTATUS status;
  2458.         status = htFormSet (cursor, "Memo")htFormGetId, htCurSetOption, htCurGetInfo, htFormulaExec, htItemBindForm###
  2459. FunctionhtFormTemplateCreates a virtual form from the next inserted documents bindings.
  2460. Defines a virtual form which is created at the next htDocPut call. This function is invalid in a cursor containing an active index. After calling this function, any htItemBind calls create virtual items in the virtual form. The next htDocPut call creates a form from the virtual form containing the same items as the new document.HTSTATUS return code. Failures include:
  2461.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2462.         HTFAIL_DUPLICATE (a form with the given form name exists in this cursor);
  2463.         HTFAIL_ACTIVE_RESULT (clear the active result to enable this operation).HTSTATUS status;
  2464.         status = htFormTemplate (cursor, "NewForm");htFormSet, htItemBind, htDocPutForm###################################
  2465. ObjectIndex#####################
  2466. ##########################################################
  2467. cursor
  2468.     The cursor in which to create the document.
  2469.     docid
  2470.     The buffer to receive the new documents ID. If bulk storage is active, then documents created with htDocPut do not have a valid document ID until the containing cursor is closed, and this value will be NULLID. Otherwise, this document ID behaves like any normal document.
  2471. HTSTATUS htDocPut (cursor, docid);
  2472.     HTCURSOR    cursor;         /* Input */?
  2473.     HTDOCID    *docid;         /* Output, Optional */?
  2474. cursor
  2475.     The cursor containing the index.?
  2476. HTSTATUS htDocUpdate (cursor);
  2477.     HTCURSOR    cursor;         /* Input */?
  2478. Each HiTest process or task contains error information accessible in various ways. Since different programmers prefer different methods, HiTest has three error handling methods: simple error retrieval, error writeback buffers, and an error callback procedure. Each process or task has its own error information. Calling a HiTest function will clear any error information from a previous function call. This does not apply to the htError functions, which have no effect on the current error information.
  2479. See the Error Handling section of Chapter 3, Programming to the HiTest API for a discussion of error handling and a list of error codes and severities.?
  2480. The error group contains the following functions:?
  2481. htErrorFetch        Obtains the current error information?
  2482. htErrorSetBuffer        Sets writeback buffers to receive error information on any HiTest error?
  2483. htErrorSetProc        Assigns an error callback function
  2484. length
  2485.     The length of the supplied error message buffer in the message parameter. Use a value of zero if the buffer is of sufficient size to hold the message. The constant HTLEN_ERROR defines the maximum error message length.
  2486.     status?
  2487.     The buffer to receive the error status code.?
  2488.     severity?
  2489.     The buffer to receive the severity of the error code.
  2490.     message
  2491.     The buffer to receive the error message string. Supply the buffer length in the length parameter.
  2492. HTINT htErrorFetch (length, status, severity, message);?
  2493.     HTINT        length;        /* Input, Optional */
  2494.     HTSTATUS    *status;        /* Output, Optional */
  2495.     HTSEVERITY    *severity;        /* Output, Optional */
  2496.     char        *message;        /* Output, Optional */
  2497. length
  2498.     The length of the buffer which will receive the error message. The constant HTLEN_ERROR defines the maximum error message length. A value of zero indicates that the buffer is of sufficient length to contain the result.?
  2499.     buffer?
  2500.     The buffer to receive the error message string.
  2501.     status?
  2502.     The buffer to receive the error code.
  2503.     severity?
  2504.     The buffer to receive the error severity.
  2505. void htErrorSetBuffer (length, buffer, status, severity);?
  2506.     HTINT        length;         /* Input, Optional */?
  2507.     char        *buffer;         /* Input, Optional */?
  2508.     HTSTATUS    *status;         /* Input, Optional */
  2509.     HTSEVERITY    *severity;         /* Input, Optional */
  2510. errproc?
  2511.     The address of the callback function. Define the callback function based on the HTERRORPROC prototype declaration:?
  2512. typedef HTSTATUS (far HTAPIERRTYPE HTERRORPROC)?
  2513.                             (HTSTATUS code,
  2514.                              HTSEVERITY severity,
  2515.                              char far *errmsg,?
  2516.                              void far *buffer);
  2517.     The callback function parameters are:
  2518.  is the error status code;
  2519. severity
  2520.  is the error severity;?
  2521. errmsg
  2522.  is a read-only pointer to the error message string;
  2523. buffer
  2524.  is the errparam parameter supplied to htErrorSetProc.
  2525.     The constant HTAPIERR defines the platform independent calling convention for error callback functions.
  2526.     errparam?
  2527.     A parameter supplied when HiTest calls the callback function. This provides a method for the calling program to transmit its own context information to the callback function.?
  2528. HTERRORPROC htErrorSetProc (errproc, errparam);?
  2529.     HTERRORPROC        errproc;         /* Input */
  2530.     void            *errparam;         /* Input, Optional */
  2531. A field is the component of a form which describes a single data item within a document. Each form contains one or more fields. The primary attributes of a field are a name and data type. When strict binding is in effect, all items within a document must have a corresponding field within the documents form.
  2532. The following flags define field attributes in the HTFIELD structure:?
  2533. HTFIELD_READWRITERS        Field contains readwriter names
  2534. HTFIELD_EDITABLE            Field may be edited
  2535. HTFIELD_NAMES            Field contains distinguished names
  2536. HTFIELD_STOREDV            Always store default values?
  2537. HTFIELD_READERS            Field contains document readers?
  2538. HTFIELD_SECTION            Field contains a section
  2539. HTFIELD_COMPUTED            Computed field?
  2540. HTFIELD_KEYWORDS            Keywords field?
  2541. HTFIELD_PROTECTED            Field is protected
  2542. HTFIELD_REFERENCE            Name is reference to a shared field?
  2543. HTFIELD_SIGN                Field is signed?
  2544. HTFIELD_SEAL                Field is sealed (encrypted)?
  2545. HTFIELD_KWD_UI_STD        Keywords UI is standard?
  2546. HTFIELD_KWD_UI_CHECK        Keywords UI is a checkbox?
  2547. HTFIELD_KWD_UI_RADIO        Keywords UI is a radio button?
  2548. HTFIELD_KWD_UI_NEW        Allow new keywords
  2549. htFieldList and htFieldGetInfo return the following field attribute structure:
  2550. typedef struct
  2551.   HTTYPE type;                /* Field data type */?
  2552.   char name [HTLEN_FIELDNAME + 1];    /* Field name */?
  2553.   HTFLAGS flags;                /* Field flags (HTFIELD_xxx) */?
  2554.   HTINT desc_len;                /* Length of the field?
  2555.                            description */?
  2556.   HTINT keylist_len;            /* Length of the keywords text?
  2557.                            list */
  2558. } HTFIELD;                    /* Field attribute structure */
  2559. The field group contains the following functions:?
  2560. htFieldCount        Obtains the number of fields in a form
  2561. htFieldGetInfo        Obtains a piece of information about a form field?
  2562. htFieldList        Iterates through fields in a form
  2563. cursor
  2564.     The cursor containing the form.
  2565.     formid?
  2566.     The form from which to obtain the field count.?
  2567.     fieldcount?
  2568.     The buffer to receive the number of fields in the form.
  2569. HTSTATUS htFieldCount (cursor, formid, fieldcount);?
  2570.     HTCURSOR    cursor;         /* Input */?
  2571.     HTFORMID    formid;         /* Input */?
  2572.     HTINT        *fieldcount;     /* Output */
  2573. cursor
  2574.     The cursor containing the form.
  2575.     formid?
  2576.     The form from which to obtain the field information.?
  2577.     fieldname
  2578.     The name of the desired field within the form.?
  2579.     item?
  2580.     One value from an enumeration of field items. Each item corresponds to a type (and length, for variable length types). The following table lists legal items with their corresponding data types and, where relevant, lengths:?
  2581. constant                    type                    
  2582. HTFIELDINFO_HTFIELD        HTFIELD *
  2583.     HTFIELDINFO_DESCRIPTION        char [HTFIELD.desc_len]?
  2584.     HTFIELDINFO_KEYWORDS        HTTYPE_TEXT_LIST,
  2585.                         length: HTFIELD.keylist_len?
  2586.     HTFIELD obtains the HTFIELD information structure.?
  2587.     DESCRIPTION obtains the field description;?
  2588.     KEYWORDS obtains the field keywords text list. Each element in this text list is one keyword. Each keyword may contain one or more synonyms in the form of KEY1|KEY2, where the leftmost string is the value displayed in the UI, and the rightmost string is the value stored in the item;
  2589.     buffer?
  2590.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  2591. HTSTATUS htFieldGetInfo (cursor, formid, fieldname, item,?
  2592.                      buffer);
  2593.     HTCURSOR         cursor;         /* Input */?
  2594.     HTFORMID        formid;         /* Input */
  2595.     char            *fieldname;     /* Input */
  2596.     HTFIELDINFO        item;         /* Input */?
  2597.     void            *buffer;         /* Output */?
  2598. cursor
  2599.     The cursor containing the form.
  2600.     formid?
  2601.     The form from which to list fields.
  2602.     first
  2603.     Whether to get the first or next field. TRUE resets the field list, FALSE obtains the next field in the list. This value is always TRUE on the first call for a given form.
  2604.     field
  2605.     The structure to receive information on the field. See the Field object section preceding the htField functions for a description of this structure and its contents. The description and keyword list lengths define the required buffer length for htFieldGetInfo when obtaining the field description and keywords, respectively.?
  2606. HTSTATUS htFieldList (cursor, formid, first, field);
  2607.     HTCURSOR    cursor;         /* Input */?
  2608.     HTFORMID    formid;         /* Input */?
  2609.     HTBOOL    first;         /* Input */
  2610.     HTFIELD    *field;         /* Output */?
  2611. Internally, Lotus Notes stores file attachments as items of a particular data type. The HiTest API handles files differently since they may have different actions performed on them, specifically attaching and extracting. Notes stores files attached to a document within items named $FILE, and these are the items accessed by the file functions. The primary attribute of a file is a file name (which does not include any path information).
  2612. The file group contains the following functions:
  2613. htFileDelete        Deletes a file attachment from a document?
  2614. htFileFetch        Extracts a file attachment from a document to a file?
  2615. htFileList        Iterates through file attachments in a document?
  2616. htFilePut        Attaches a file to a document
  2617. dochand?
  2618.     The document containing the file attachment.?
  2619.     filename?
  2620.     The filename of the attached file. Use htFileList to obtain a list of files within a document.?
  2621. HTSTATUS htFileDelete (dochand, filename);
  2622.     HTDOCHANDLE        dochand;         /* Input */
  2623.     char            *filename;         /* Input */
  2624. dochand?
  2625.     The document containing the file attachment.?
  2626.     directory
  2627.     The directory into which to extract the file. A NULL pointer or empty string directs HiTest to use the current working directory. Valid directory values are a fully specified path with or without the drive (e.g., C:\HITEST\DOC or \HITEST\DOC), or a path relative to the current directory (e.g., DOC when the current directory is HITEST).
  2628.     filename?
  2629.     The filename of the attached file. Use htFileList to obtain a list of files within a document.?
  2630. HTSTATUS htFileFetch (dochand, directory, filename);
  2631.     HTDOCHANDLE        dochand;         /* Input */
  2632.     char            *directory;     /* Input, Optional */
  2633.     char            *filename;         /* Input */
  2634. dochand?
  2635.     The document from which to list file attachments.
  2636.     first
  2637.     Whether to get the first or next file attachment. TRUE resets the attachment list, FALSE simply obtains the next attachment in the list. The value always acts as TRUE on the first call for a given document handle.
  2638.     filename?
  2639.     The buffer to receive the filename string. Attached files store only the file name and extension, not the full path. The constant HTLEN_FILENAME defines the maximum filename length.
  2640. HTSTATUS htFileList (dochand, first, filename);?
  2641.     HTDOCHANDLE        dochand;         /* Input */
  2642.     HTBOOL        first;         /* Input */?
  2643.     char            *filename;         /* Output */?
  2644. dochand?
  2645.     The document containing the file attachment.?
  2646.     filename?
  2647.     The filename of the file to attach. If the file is not in the current working directory, use the full path.
  2648. HTSTATUS htFilePut (dochand, filepath);?
  2649.     HTDOCHANDLE        dochand;         /* Input */
  2650.     char            *filepath;         /* Input */
  2651. Notes uses fonts in various objects, including composite records, views, and columns. A font does not support any functions, but does need documentation. Notes normally supports three basic fonts (roman, swiss, and typewriter). Any document which uses fonts beyond this set contains a composite item named $FONTS to define the additional fonts. HiTest provides operating system-specific font representation of fonts (currently available only for Windows) with the functions htCompGetOSFont and htCompPutOSFont. These functions simplify manipulation of font information within a document. A font contains four components: font face, font attributes, font color, and font size.?
  2652. The face component describes the basic font. This component is either one of the values in the following list or a number equal to or greater than the constant HTFONT_FACE_USERDEF_MIN:
  2653. HTFONT_FACE_ROMAN        Default
  2654. HTFONT_FACE_SWISS?
  2655. HTFONT_FACE_TYPEWRITER
  2656. The following flags define font attributes in the HTFONT structure:?
  2657. HTFONT_ATTRIB_BOLD
  2658. HTFONT_ATTRIB_ITALIC
  2659. HTFONT_ATTRIB_UNDERLINE?
  2660. HTFONT_ATTRIB_STRIKEOUT?
  2661. HTFONT_ATTRIB_SUPER?
  2662. HTFONT_ATTRIB_SUB?
  2663. The following constants define font color in the HTFONT structure:
  2664. HTFONT_COLOR_BLACK        Default?
  2665. HTFONT_COLOR_WRITE
  2666. HTFONT_COLOR_RED
  2667. HTFONT_COLOR_GREEN
  2668. HTFONT_COLOR_BLUE?
  2669. HTFONT_COLOR_MAGENTA
  2670. HTFONT_COLOR_YELLOW?
  2671. HTFONT_COLOR_CYAN?
  2672. Each font has a size in points. Since this is simply an integer number, the only constant defined is the default constant HTFONT_SIZE_DEFAULT, which is ten.
  2673. The following structure represents a font:
  2674. typedef struct
  2675.   HTBYTE face;        /* Font face (HTFONT_FACE_xxx) */?
  2676.   HTBYTE attrib;        /* Font attributes (HTFONT_ATTRIB_xxx) */?
  2677.   HTBYTE color;        /* Font color (HTFONT_COLOR_xxx) */
  2678.   HTBYTE size;        /* Font size in points */?
  2679. } HTFONT;?
  2680. A form is one of two primary types of metadata (the other is a view). Each database contains zero or more forms, which describe the format of documents. A form consists of various attributes and one or more fields. HiTest can automatically filter data through forms, providing a more consistent representation of data. The filtering occurs only when the strict binding option is active (the default state), in which case HiTest type-checks all data transferred against the relevant form. Lotus Notes represents forms as simply data, and the standard Lotus Notes API supplies no abstraction of this data. The HiTest form abstraction accurately represents forms as metadata, and supports easy access to that metadata. The primary attributes of a form are a name and ID. HiTest uses the constant NULLID to represent an invalid form ID.
  2681. The following flags define form attributes in the HTFORM structure:?
  2682. HTFORM_USE_REFERENCE        Use reference note
  2683. HTFORM_MAIL_ON_SAVE        Mail when saving document
  2684. HTFORM_RESPOSE_TO_RESP        Save REFID to response
  2685. HTFORM_RESPONSE_TO_DOC        Save REFID to main parent?
  2686. HTFORM_RECALC_FIELDS        Recalc fields when focus is lost
  2687. HTFORM_FORM_IN_DOC        Store form in document
  2688. HTFORM_USE_FORE_COLOR        Use foreground color to paint
  2689. HTFORM_OLE_ACT_COMP        Activate OLE objects at compose
  2690. HTFORM_OLE_ACT_EDIT        Activate OLE objects at edit?
  2691. HTFORM_OLE_ACT_READ        Activate OLE objects at read?
  2692. HTFORM_SHOW_WIN_COMP        Show editor window if OLE_ACT_COMP
  2693. HTFORM_SHOW_WIN_EDIT        Show editor window if OLE_ACT_EDIT
  2694. HTFORM_SHOW_WIN_READ        Show editor window if OLE_ACT_READ
  2695. HTFORM_UPDATE_IS_RESP        Updates become responses?
  2696. HTFORM_UPDATE_IS_PARENT        Updates become parents?
  2697. htFormList returns the following form summary structure:
  2698. typedef struct
  2699.   HTFORMID formid;            /* Form ID */
  2700.   HTBOOL hidden;                /* Whether form is hidden in UI */
  2701.   char name [HTLEN_DESIGNNAME + 1];            /* Form name */?
  2702.   char display_name1 [HTLEN_DISPLAYNAME + 1];    /* Primary display
  2703.                                    name */
  2704.   char display_name2 [HTLEN_DISPLAYNAME + 1];    /* Secondary display
  2705.                                    name */
  2706. } HTFORMSUMM;                /* htFormList summary structure */?
  2707. htFormGetAttrib returns the following form attribute structure:?
  2708. typedef struct
  2709.   HTFLAGS flags;                /* Form flags (HTFORM_xxx) */?
  2710.   WORD color;                /* Background color */?
  2711.   HTBOOL hidden;                /* Whether form is hidden in UI */
  2712.   char name [HTLEN_DESIGNNAME + 1];            /* Form name */?
  2713.   char display_name1 [HTLEN_DISPLAYNAME + 1];    /* Primary display
  2714.                                    name */
  2715.   char display_name2 [HTLEN_DISPLAYNAME + 1];    /* Secondary display
  2716.                                    name */
  2717. } HTFORM;                         /* Form attribute structure */?
  2718. The three name fields in the HTFORM and HTFORMSUMM structures handle Notes multiple naming of objects. Forms may have multiple names, and the first name may consists of two parts. The 
  2719.  field contains the string which Notes uses internally to refer to a given form. The ?
  2720. display_name1?
  2721.  field contains the name which appears in the Notes UI. For a cascading form name, the ?
  2722. display_name2?
  2723.  field contains the cascading component of the Notes UI name. When a form has only one name, the ?
  2724.  field is equal to either 
  2725. display_name1?
  2726.  (if not cascading) or ?
  2727. display_name1?
  2728. display_name2?
  2729.  (if cascading). The hidden field indicates whether the Notes UI Compose menu normally displays the form. A hidden form has either its display name enclosed in parenthesis or the form attribute Include in Compose Menu unchecked.
  2730. The form group contains the following functions:
  2731. htFormCopy        Copies a form from one cursor to another
  2732. htFormDelete        Deletes a form from a database
  2733. htFormGetAttrib        Obtains the attributes of a form?
  2734. htFormGetId        Obtains a form ID from the form name?
  2735. htFormList        Iterates through forms in a database
  2736. htFormSet        Assigns the active form for a cursor?
  2737. htFormTemplate        Creates a virtual form from the next inserted documents bindings
  2738. src_cursor
  2739.     The cursor from which to copy the form.
  2740.     src_formid?
  2741.     The form to copy within the source cursor.?
  2742.     dest_cursor
  2743.     The cursor into which to copy the new form.
  2744.     dest_formname
  2745.     The name for the new form in the destination cursor. To keep the original name, use NULL or the empty string. Otherwise, the name formatting follows the Notes UI rules (display_name1\display_name2 | name -- see the Lotus Notes Application Developers Reference). A new name must be supplied when the source and destination cursors are connected to the same database.
  2746.     dest_formid
  2747.     The buffer which receives the form ID for the new form.
  2748. HTSTATUS htFormCopy (src_cursor, src_formid, dest_cursor,?
  2749.                    dest_formname,    dest_formid);?
  2750.     HTCURSOR    src_cursor;         /* Input */?
  2751.     HTFORMID    src_formid;         /* Input */?
  2752.     HTCURSOR    dest_cursor;         /* Input */
  2753.     char        *dest_formname;         /* Input, Optional */
  2754.     FORMID    *dest_formid;         /* Output, Optional */
  2755. cursor
  2756.     The cursor containing the form.
  2757.     formid?
  2758.     The form to delete.
  2759. HTSTATUS htFormDelete (cursor, formid);?
  2760.     HTCURSOR    cursor;         /* Input */?
  2761.     HTFORMID    formid;         /* Input */?
  2762. cursor
  2763.     The cursor containing the form.
  2764.     formid?
  2765.     The form for which to obtain attributes.?
  2766.     form?
  2767.     The structure to receive form attributes. See the Form object section preceding the htForm functions for a description of this structure and its contents.?
  2768. HTSTATUS htFormGetAttrib (cursor, formid, form);
  2769.     HTCURSOR    cursor;         /* Input */?
  2770.     HTFORMID    formid;         /* Input */?
  2771.     HTFORM    *form;         /* Output */?
  2772. cursor
  2773.     The cursor containing the form.
  2774.     formname?
  2775.     The form name for which to obtain the ID.
  2776. HTFORMID htFormGetId (HTCURSOR cursor, char *formname);?
  2777.     HTCURSOR    cursor;         /* Input */?
  2778.     char        *formname;         /* Input */?
  2779. cursor
  2780.     The cursor from which to list forms.?
  2781.     operation
  2782.     An element of the HTLIST enumeration that indicates whether and how to reset the form list. Use HTLIST_REFRESH to discard the form list and obtain a new list from Notes. Use HTLIST_FIRST to set the next element in the list to the first element. Use HTLIST_NEXT to obtain the element following the previously fetched element. The first call to this function after opening the cursor always uses the value HTLIST_REFRESH.
  2783.     htformsumm?
  2784.     The structure to receive the forms summary information. See the Form object section preceding the htForm functions for a description of this structure and its contents.?
  2785. HTSTATUS htFormList (cursor, operation, formsumm);
  2786.     HTCURSOR    cursor;         /* Input */?
  2787.     HTLIST    operation;         /* Input */
  2788.     HTFORMSUMM    *formsumm;         /* Output */?
  2789. cursor
  2790.     The cursor in which to set the active form.
  2791.     formid?
  2792.     The form to set as the active form. Use NULLID to clear the active form.?
  2793. HTSTATUS htFormSet (HTCURSOR cursor, HTFORMID formid);
  2794.     HTCURSOR    cursor;         /* Input */?
  2795.     HTFORMID    formid;         /* Input */?
  2796. cursor
  2797.     The cursor in which to create the form template.?
  2798.     formname?
  2799.     The form name to use for the new form. The name formatting follows the Notes UI rules (display_name1\display_name2 | name -- see the Lotus Notes Application Developers Reference).
  2800. HTSTATUS htFormTemplate (cursor, formname);?
  2801.     HTCURSOR    cursor;         /* Input */?
  2802.     char        *formname;         /* Input */?
  2803. Each cursor contains a formula buffer to construct formulas in one or more pieces. On execution, HiTest assembles the entire formula internally. Formula execution produces an index. An empty formula produces the same results as SELECT @ALL. When producing a view-based index, the formula buffer must be empty. The syntax of Notes selection formulas is defined in the Lotus Notes Application Developers Reference.
  2804. The formula group contains the following functions:?
  2805. htFormulaConcat        Concatenates a string to the formula buffer
  2806. htFormulaConcatf    Concatenates a printf-style formatted string to the formula buffer?
  2807. htFormulaCopy        Copies a portion of the current formula buffer?
  2808. htFormulaExec        Executes the formula buffer and produces an index
  2809. htFormulaLength        Returns the length of the current formula buffer?
  2810. htFormulaReset        Clears the formula buffer?
  2811. cursor
  2812.     The cursor to use.?
  2813.     string?
  2814.     The string to concatenate to the formula buffer.?
  2815. HTSTATUS htFormulaConcat (cursor, string);
  2816.     HTCURSOR    cursor;         /* Input */?
  2817.     char        *string;         /* Input */?
  2818. FunctionhtFormulaConcatConcatenates a string to the formula buffer.
  2819. Concatenates a string to the cursors formula buffer. This supports construction of a formula a piece at a time, or in a single call. Use the htFormulaConcatf function for printf-style string formatting. Both the htCurReset and htFormulaReset functions clear the formula buffer.HTSTATUS return code. Failures include:
  2820.         HTFAIL_INVALID_CURSOR.HTSTATUS status;
  2821.         status = htFormulaConcat (cursor, "SELECT @All")htFormulaConcatf, htFormulaReset, htCurResetFormula############
  2822. FunctionhtFormulaConcatfConcatenates a printf-style formatted string to the formula buffer.
  2823. Concatenates a printf-style formatted string to the cursors formula buffer. This supports construction of a formula a piece at a time, or in a single call. This function supports multiple arguments and the format string is any valid printf format string. Use the htFormulaConcat function for simple (non-formatted) formula concatenation. Both the htCurReset and htFormulaReset functions clear the formula buffer.HTSTATUS return code. Failures include:
  2824.         HTFAIL_INVALID_CURSOR.HTSTATUS status;
  2825.         status = htFormulaConcatf (cursor, "SELECT Form = \"%s\"",
  2826.                                            formname)htFormulaConcat, htFormulaReset, htCurResetFormula###############################################
  2827. FunctionhtFormulaCopyCopies a portion of the current formula buffer.
  2828. Copies some or all of the cursors formula buffer to a supplied buffer.HTINT number of bytes copied.char formula_fragment [20];
  2829.         length = htFormulaCopy (cursor, 0, 19, formula_fragment);htFormulaLengthFormula############
  2830. FunctionhtFormulaExecExecutes the formula buffer and produces an index.
  2831. Produces an index in the cursor by executing the contents of the formula buffer as a Notes formula. The empty formula produces the same effects as the formula SELECT @ALL. See the Lotus Notes Application Developers Reference for a description of valid formula syntax. After execution, the htIndex functions support manipulation of the index produced. The type of index depends on whether there is an active view.
  2832.         If there is no active view, then this function produces a flat index. HiTest executes the formula against the cursors database, producing a list of documents. Any active form must be set before calling this function (any attempts to do so with an active index will fail). If strict binding is in effect, then this function requires an active form, and the index will only contain documents of the active form. After execution, navigation through the resulting index is possible with the functions htIndexNavigate, htIndexSetPos, or htIndexSetTreePos.
  2833.         If there is an active view, then that view produces the hierarchical index. The formula buffer must be empty. This function will lose efficiency if the VIEW_POSITION cursor-level option is active. Access to view data with the htCell functions requires a view-based index.HTSTATUS return code. Failures include:
  2834.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2835.         HTFAIL_FORM_UNAVAIL (search formula with strict bind requires an active form);
  2836.         HTFAIL_INVALID_FORMULA (formula contains incorrect syntax).HTSTATUS status;
  2837.         status = htFormulaExec (cursor);htFormulaConcat, htFormulaConcatf, htFormulaReset, htFormSet, htViewSet, htIndexNavigate, htIndexSetPos, htIndexSetTreePos, htCurReset, htSetOptionFormula#####################################################
  2838. FunctionhtFormulaLengthReturns the length of the current formula buffer.
  2839. Returns the string length of the cursors current formula buffer.HTINT formula buffer length. Returns zero if the formula buffer is empty.HTINT length;
  2840.         length = htFormulaLength (cursor);htFormulaConcat, htFormulaConcatf, htFormulaCopyFormula######################################
  2841. FunctionhtFormulaResetClears the formula buffer.
  2842. Clears the cursors formula buffer.HTSTATUS return code. Failures include:
  2843.         HTFAIL_INVALID_CURSOR.htFormulaReset (cursor);htCurResetFormula#####################################
  2844. ObjectItem######################
  2845. FunctionhtIndexCountObtains the number of documents in an index.
  2846. Obtains the number of elements in the cursors active index. Use this count as the maximum index position for the htIndexGetPos and htIndexSetPos functions. For a view-based index, the count depends on the VIEW_POSITION option. When it is inactive (the default), this function obtains the number of top-level entries in the index. When it is active, this function obtains the total number of entries in the index.HTINT number of document in the cursors active index. Returns zero if there is no active index.HTINT count;
  2847.         count = htIndexCount (cursor);htFormulaExec, htIndexGetPos, htIndexSetPos, htSetOptionIndex
  2848. ##########################################################
  2849. FunctionhtIndexGetInfoObtains a piece of information about the active index.
  2850. Fetches one of various index information items into a supplied buffer. Each item has a data type, and the buffer must be sufficiently large to hold the result.HTSTATUS return code. Failures include:
  2851.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2852.         HTFAIL_ILLEGAL_ENUM (invalid item).HTBOOL isviewbased;
  2853.         HTSTATUS status;
  2854.         status = htIndexGetInfo (HTINDEXINFO_ISVIEWBASED,
  2855.                                          &isviewbased);htFormulaExec, htIndexSearch, htCurResetIndex#############################################
  2856. FunctionhtIndexGetPosObtains the current position in the index.
  2857. Obtains the current position in the cursors index. The first elements position  is one. Use the htIndexCount function to get the last elements position.HTINT one-based position in the active index. Returns zero if there is no active index.HTINT position;        
  2858.         position = htIndexGetPos (cursor);htIndexCount, htIndexSetPosIndex######################
  2859. FunctionhtIndexGetTreePosObtains the current hierarchical position in a view-based index.
  2860. Obtains the current hierarchical position in the cursors view-based index. This position is in the format of a Notes @DocNumber value (e.g., 13.2.4). The position represents a pointer to an exact view element. Use htIndexSetTreePos to move directly to this position. This function is only available on view-based indices when the VIEW_POSITION option is inactive.HTSTATUS return code. Failures include:
  2861.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2862.         HTFAIL_DATA_UNAVAIL (no active view-based index);
  2863.         HTFAIL_OVERFLOW (position string is too long for supplied buffer).char position [81];
  2864.         HTSTATUS status;
  2865.         status = htIndexGetTreePos (cursor, 80, position);htIndexSetTreePos, htIndexGetPosIndex##########################################################
  2866. ,Fl=}
  2867. FunctionhtIndexNavigateNavigates through the documents in an index.
  2868. Navigates through the cursors index using a navigation style (direction). More styles are available for view-based indices than for flat indices. To retrieve each of the entries in an index, use the HTNAV_NEXT direction (since position zero is before the first entry, this will iterate through all entries in the index). Every entry in a flat index is a document. The entries (rows) in a view-based index can be of three types: a document, a category, or a totals row. Navigation loses efficiency against a view-based index when the view position option is active.HTSTATUS return code. Failures include:
  2869.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2870.         HTFAIL_ILLEGAL_ENUM (invalid direction);
  2871.         HTFAIL_INVALID_NAVTYPE (direction is invalid with the active index);
  2872.         HTFAIL_END_OF_DATA (no more results available);
  2873.         HTFAIL_DATA_UNAVAIL (no active index) OR;
  2874.         HTFAIL_DATA_UNAVAIL (direction current with invalid view-based index position).HTINT indent;
  2875.         HTDOCID docid;
  2876.         HTSTATUS status;
  2877.         status = htIndexNavigate (cursor,
  2878.                                           HTNAV_NEXT + HTNAV_BACKWARD,
  2879.                                           &docid, &indent);htFormulaExec, htIndexGetInfo, htIndexSetPos, htIndexRefresh, htDocFetch, htDocUpdate, htSetOptionIndex#######
  2880. FunctionhtIndexRefreshRefreshes a view-based index.
  2881. Performs a view refresh for the cursors index. This functionality is only available for view-based indices. Changes such as deleting a document which affect a view require either this function or recomputation with htFormulaExec to integrate them into the index. After refreshing the index, the function attempts to restore the index position prior to this call.HTSTATUS return code. Failures include:
  2882.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2883.         HTFAIL_DATA_UNAVAIL (no active view-based index).HTSTATUS status;
  2884.         status = htIndexRefresh (cursor);htFormulaExecIndex############################################
  2885. FunctionhtIndexSearchPerforms a full text search.
  2886. Performs a full text search against the documents in the active index (or the entire database if there is no active index). The results produced are either a flat or view-based index, depending on the index prior to the search. For view-based results, the search index does not contain a hierarchy (i.e., there is only one level and hierarchical navigation styles dont work), but still supports access to cell data. The index produced replaces any previous index, but canceling the full text search index with the HTSEARCH_CANCEL flag restores the original index.
  2887.         Results of a full text search are available with the standard htIndex functions. Hierarchical navigation styles (e.g., CHILD, PARENT, etc.) do not work. Use the htIndexGetInfo function with the HTINDEXINFO_FTSCORE item to obtain scores produced from the full text search (see HTSEARCH_SCORE flag below).HTSTATUS return code. Failures include:
  2888.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2889.         HTFAIL_OVERFLOW (limit too large);
  2890.         HTFAIL_DATA_UNAVAIL (cancel or refine requires an active full text index);
  2891.         HTFAIL_END_OF_DATA (no documents found or query is the empty string).HTSTATUS status;
  2892.         status = htIndexSearch (cursor, "x and y",
  2893.                                         HTSEARCH_SORT_DATE, 100);htFormulaExec, htIndexGetInfo, htIndexNavigate, htIndexGetPos, htIndexSetPos, htCurResetIndex####
  2894. FunctionhtIndexSetPosAssigns the current position in the index.
  2895. Assigns the current position in the cursors index. The first elements position is one. Use the htIndexCount function to get the last elements position. This function loses efficiency on a view-based index when the VIEW_POSITION option is active.HTSTATUS return code. Failures include:
  2896.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2897.         HTFAIL_DATA_UNAVAIL (no active index);
  2898.         HTFAIL_END_OF_DATA (position is invalid).HTSTATUS status;
  2899.         status = htIndexSetPos (cursor, 30);htIndexCount, htIndexGetPos, htSetOptionIndex################
  2900. FunctionhtIndexSetTreePosAssigns the current hierarchical position in a view-based index.
  2901. Assigns the current hierarchical position in the cursors index. The position is in the format of a Notes @DocNumber (e.g., 13.2.4). Programs can either use htIndexGetTreePos to obtain the current position or construct a position string programatically. This function is only available on view-based indices when the VIEW_POSITION option is inactive.HTSTATUS return code. Failures include:
  2902.         HTFAIL_INVALID_CURSOR (invalid cursor);
  2903.         HTFAIL_DATA_UNAVAIL (no active view-based index);
  2904.         HTFAIL_END_OF_DATA (position is invalid);
  2905.         HTFAIL_OVERFLOW (multi-level position is invalid in a full-text search index).HTSTATUS status;
  2906.         status = htIndexSetPos (cursor, "13.2.4");htIndexGetTreePos, htIndexSetPos, htIndexSearchIndex###############################
  2907. ObjectMacro#####################
  2908. FunctionhtItemBindBinds an item name to a program variable.
  2909. Creates a binding between a variable in the calling program and an itemname in the active index. This binding is used by the htDocFetch, htDocPut, and htDocUpdate functions. Use item binding when operating on the same set of items in multiple documents. Create bindings after using htFormulaExec to produce an index. Remove bindings with htFormulaExec, htCurReset, or htItemUnbind with the same item name. 
  2910.         Fetching a document causes all bound items to be converted and transferred from the document to the bound buffers. Updating a document writes certain bound items (those with their update parameter changed to TRUE) back to the last fetched document. Putting a document converts and transfers data from the bound buffers into items in the new document. Binding a composite item generates an error when the cursor option FETCH_SUMMARY is active, since only summary data is available.HTSTATUS return code. Failures include:
  2911.         HTFAIL_INVALID_CURSOR
  2912.         HTFAIL_FORM_UNAVAIL (strict binding requires an active form);
  2913.         HTFAIL_INVALID_FIELD (no such field exists in the active form);
  2914.         HTFAIL_DATA_UNAVAIL (cannot bind a composite item if fetch_summary is active).char date_string [HTLEN_DATETIME_TEXT + 1];
  2915.         HTBOOL nullind, update;
  2916.         HTSTATUS status;
  2917.         status = htItemBind (cursor, "Date", HTTYPE_TEXT, 0,
  2918.                                    HTTYPE_DATETIME, date_string, NULL,
  2919.                                    &nullind, &update);htItemUnbind, htDocFetch, htDocPut, htDocUpdate, htCellBind, htFormulaExec, htCurResetItem########
  2920. ObjectMail######################
  2921. ObjectServer####################
  2922. cursor
  2923.     The cursor to use.?
  2924.     format?
  2925.     The printf-style format string to concatenate to the formula buffer.?
  2926.     ... (variable Parameters)
  2927.     Variable parameters for the printf-style formatting.?
  2928. HTSTATUS htFormulaConcatf (cursor, format, ...);
  2929.     HTCURSOR    cursor;         /* Input */?
  2930.     char        *format;         /* Input */?
  2931. cursor
  2932.     The cursor to use.?
  2933.     start
  2934.     The character index in the formula buffer from which to start the copy (the first character is index zero). If start is greater than the formula length, the result is the empty string.?
  2935.     count
  2936.     The number of characters to copy. Use zero to copy until the end of the formula buffer. If there are not enough characters, the copy stops at the last character.
  2937.     buffer?
  2938.     Buffer into which to copy the formula fragment.
  2939. HTINT htFormulaCopy (cursor, start, count, buffer);?
  2940.     HTCURSOR    cursor;         /* Input */?
  2941.     HTINT        start;         /* Input, Optional */
  2942.     HTINT        count;         /* Input, Optional */
  2943.     char        *buffer;         /* Output */
  2944. cursor
  2945.     The cursor in which to execute the formula buffer.?
  2946. HTSTATUS htFormulaExec (HTCURSOR cursor);?
  2947.     HTCURSOR    cursor;         /* Input */?
  2948. cursor
  2949.     The cursor to use.?
  2950. HTINT htFormulaLength (cursor);?
  2951.     HTCURSOR    cursor;         /* Input */?
  2952. cursor
  2953.     The cursor to use.?
  2954. HTSTATUS htFormulaReset (HTCURSOR cursor);
  2955.     HTCURSOR    cursor;         /* Input */?
  2956. Each cursor may contain one active  index. An index is a set of documents produced by executing a formula against a database, executing a full text search query against a database or index, or accessing a view. An index may be flat or hierarchical (view-based). There are two ways to move through an index: navigation relative to the current position, and assignment of an absolute position. A cursor in which an index has been produced contains an active index. This prevents certain operations (e.g., setting the active form or view) without first clearing the active index. Full text search can produce a new index or refine an existing index.
  2957. Setting an absolute position within a view-based index has two usages. The default usage (when the VIEW POSITION option is FALSE) is to position based on top-level entries within the view. This enables rapid movement through a view-based index, and is much quicker than normal navigation when moving over large distances. Set the VIEW POSITION option to TRUE to allow programs to locate any position within the view by ordinal number. This method causes a significant slowdown when moving through a view-based index, and should generally be avoided. Large databases will aggravate the slowdown. The preferred method for view-based positioning is the default of using the top-level entries. 
  2958. The index group contains the following functions:?
  2959. htIndexCount        Obtains the number of documents in an index?
  2960. htIndexGetInfo        Obtains a piece of information about the active index?
  2961. htIndexGetPos        Obtains the current position in the index
  2962. htIndexGetTreePos    Obtains the current hierarchical position in a view-based index?
  2963. htIndexNavigate        Navigates through the documents in an index
  2964. htIndexRefresh        Refreshes a view-based index
  2965. htIndexSearch        Performs a full text search
  2966. htIndexSetPos        Assigns the current position in the index
  2967. htIndexSetTreePos    Assigns the current hierarchical position in a view-based index?
  2968. cursor
  2969.     The cursor containing the relevant index.
  2970. HTINT htIndexCount (cursor);
  2971.     HTCURSOR    cursor;         /* Input */?
  2972. cursor
  2973.     The cursor containing the relevant index.
  2974.     item?
  2975.     One value from an enumeration of index items. Each item corresponds to a type (and length, for variable length types). The following table lists legal items with their corresponding data types and, where relevant, lengths:?
  2976. constant                    type                    
  2977. HTINDEXINFO_ISSELECT        HTBOOL
  2978.     HTINDEXINFO_ISVIEWBASED        HTBOOL
  2979.     HTINDEXINFO_ISFTSEARCH        HTBOOL?
  2980.     HTINDEXINFO_VIEWDEPTH        HTINT?
  2981.     HTINDEXINFO_FTSCORE        HTINT?
  2982.     ISSELECT indicates whether the cursor contains an active index;
  2983.     ISVIEWBASED indicates whether the current index is view-based.?
  2984.     ISFTSEARCH indicates whether the current index is a result of full text search.
  2985.     VIEWDEPTH obtains the hierarchical depth of the current view-based index entry.
  2986.     FTSCORE obtains the full text search relevance score of the current full text index entry.?
  2987.     buffer?
  2988.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  2989. HTSTATUS htIndex (cursor, item, buffer);
  2990.     HTCURSOR     cursor;         /* Input */
  2991.     HTINDEXINFO    item;         /* Input */
  2992.     void        *buffer;         /* Output */
  2993. cursor
  2994.     The cursor containing the relevant index.
  2995. HTINT htIndexGetPos (cursor);?
  2996.     HTCURSOR    cursor;         /* Input */?
  2997. cursor
  2998.     The cursor containing the relevant index.
  2999.     length?
  3000.     The length of the buffer which will receive the position string. A value of zero indicates that the buffer is of sufficient length to contain the result.
  3001.     position?
  3002.     The buffer to receive the hierarchical position string.
  3003. HTSTATUS htIndexGetTreePos (cursor, length, position);
  3004.     HTCURSOR    cursor;         /* Input */?
  3005.     HTINT        length;        /* Input, Optional */
  3006.     char        *position;        /* Output */?
  3007. cursor
  3008.     The cursor containing the relevant index.
  3009.     direction
  3010.     The style of navigation to use. This value is an element of the HTNAV enumeration, combined with zero or more HTNAV flags. The following table defines HTNAV values:?
  3011. DIRECTION            MEANING                    
  3012.     HTNAV_NEXT            Locate the next document
  3013.     HTNAV_END            Go to the last document
  3014.     HTNAV_PEER*            Go to the next peer
  3015.     HTNAV_CHILD*        Go to the next child?
  3016.     HTNAV_PARENT*        Go to the next parent?
  3017.     HTNAV_MAIN*            Go to the next main document?
  3018.     HTNAV_CURRENT        Dont change the position
  3019. FLAGS                MEANING                    ?
  3020.     HTNAV_PEEK            When done, restore the position prior to call?
  3021.     HTNAV_BACKWARD        Navigate backwards (invalid with CHILD)
  3022.     HTNAV_NOCATEGORY*    Skip category entries
  3023.     HTNAV_NOVIEWTOTALS*    Skip totals entries
  3024. *values marked with an asterisk are only valid for hierarchical indices?
  3025.     docid
  3026.     The buffer to receive the document ID of the new entry. Special constant values indicate a category or totals row. The document ID value for a category row is the constant HTINDEX_DOCID_CATEGORY and the document ID value for a totals row is the constant HTINDEX_DOCID_VIEWTOTAL. These special values are negative, and all valid document are positive.?
  3027.     indent?
  3028.     The buffer to receive the view cell indentation of the new entry. This value is always zero for flat indices. For document rows in a view-based index, the top level document is zero, the first response is one, etc. For category rows, this value is the depth of cascading category indentation levels. A totals row has an indent value of zero. When rendering a view visually, the indentation determines the number of three space prefixes to add before the view row. To determine the hierarchical depth of an index entry, use the htIndexGetInfo function with the HTINDEXINFO_VIEWDEPTH item.
  3029. HTSTATUS htIndexNavigate (cursor, direction, docid, indent);
  3030.     HTCURSOR    cursor;         /* Input */?
  3031.     HTNAV        direction;         /* Input */
  3032.     HTDOCID    *docid;         /* Output, Optional */?
  3033.     HTINT        *indent;         /* Output, Optional */?
  3034. cursor
  3035.     The cursor containing the relevant index.
  3036. HTSTATUS htIndexRefresh (cursor);?
  3037.     HTCURSOR    cursor;         /* Input */?
  3038. cursor
  3039.     The cursor containing the relevant index.
  3040.     query
  3041.     The full text query to execute. See the Lotus Notes Application Developers Reference for the syntax of a full text search query.?
  3042.     flags
  3043.     The options which affect the full text search. The HTSEARCH flags may be OR-ed together, although the HTSEARCH_CANCEL flag overrides all others. The following table describes the valid HTSEARCH flags:?
  3044. FLAGS                MEANING                    ?
  3045.     HTSEARCH_SCORE        Produce relevance scores (see htIndexGetInfo)
  3046.     HTSEARCH_SORT_DATE    Sort results by date (descending)?
  3047.     HTSEARCH_SORT_ASCEND    Sort results in ascending order (default descending)
  3048.     HTSEARCH_STEM_WORDS    Stem words in search?
  3049.     HTSEARCH_REFINE        Refine a previous search. HiTest requires an active?
  3050.                     full text search index. If not used, HiTest destroys?
  3051.                     any existing full text search index and performs this
  3052.                     search against the original non-full text search?
  3053.                     index (if any)?
  3054.     HTSEARCH_CANCEL        Cancel existing full text search index, restoring the?
  3055.                     original non-full text search index (if any)?
  3056.     limit
  3057.     The maximum number of results to produce. The search will stop after finding this number of documents. Use zero for no limit, in which case the search returns all documents. The maximum limit value is 65535.
  3058. HTSTATUS htIndexSearch (cursor, query, flags, limit);?
  3059.     HTCURSOR    cursor;         /* Input */?
  3060.     char        *query;        /* Input */?
  3061.     HTFLAGS    flags;         /* Input */?
  3062.     HTINT        limit;         /* Input, Optional */
  3063. cursor
  3064.     The cursor containing the relevant index.
  3065.     position?
  3066.     The position to set in the index. One is the first index entry.
  3067. HTSTATUS htIndexSetPos (cursor, position);
  3068.     HTCURSOR    cursor;         /* Input */?
  3069.     HTINT        position;         /* Input */?
  3070. cursor
  3071.     The cursor containing the relevant index.
  3072.     position?
  3073.     The hierarchical position to set in the index.?
  3074. HTSTATUS htIndexSetPos (cursor, position);
  3075.     HTCURSOR    cursor;         /* Input */?
  3076.     char         *position;         /* Input */
  3077. Notes stores individual data values in items, which in turn make up documents. Notes uses both the terms item and field to describe data within a document. HiTest uses a single term for clarity, and item represents document data as opposed to form fields. The primary attributes of an item are an item name, a data type, and a data value. With HiTest, items can be accessed either from open documents, or by binding items to the results in an index. While Lotus Notes itself imposes no restrictions on items within a document, HiTest adds a minimal set of qualifications which support basic access and facilitate simpler item access.?
  3078. HiTest allows only one item of a given name within a given document. This restriction does not apply to file attachments (which all use the same name) or composite items (which are stored in multiple items of the same name). Use the htFile functions to manipulate file attachments. HiTest represents all composite items of the same name as a single item. Use the htComp and htComprec functions to manipulate composite items.
  3079. Another optional restriction imposes a form of type-checking. When the STRICT_BIND option is in effect, all items in a document must match (name and data type) a field within that documents form. Disable this option with either the htSetOption or htCurSetOption functions, STRICT_BIND option.
  3080. Several item functions use two data type parameters (type and itemtype) to implement automatic conversion. In these functions the type parameter is the data type of data as seen by the calling program. The itemtype parameter is the data type of the item within the document. HiTest performs any conversions automatically when loading data to or storing data from the calling program.?
  3081. When storing an item into a document, HiTest obtains the item flags from the form field (if strict binding is active) and automatically stores them with the item. For example, using htItemPut to create a SendTo item in a document created with the Memo form would automatically get the item flag NAMES from the form field. HiTest sets this flag in the SendTo document item, indicating that the item contains distinguished names.?
  3082. One item flag assigned independently from the forms fields is the summary flag. For an item to be accessible from within a view, the items summary flag must be set. If the summary items for a single document exceed the value HTLEN_SUMMARY_DATA (15K), then the document may not display properly in views, and cell values may not be accessible. If the length of any single item exceeds HTLEN_COMPUTE_DATA (also 15K), then that item is not usable in a view or any other form of computation. By default, items of length less than  HTDEFAULT_SUMMARY_LIMIT (8K) are stored with their summary flag set. Use the htSetOption or htCurSetOption functions to change this limit to any value up to HTLEN_SUMMARY_DATA.?
  3083. The following flags define item attributes:?
  3084. HTITEM_SIGN                Signed field?
  3085. HTITEM_SEAL                Sealed field (encrypted)?
  3086. HTITEM_SUMMARY            Summary field (usable in formulas)?
  3087. HTITEM_READWRITERS        Author Names field
  3088. HTITEM_NAMES            Names field
  3089. HTITEM_PROTECTED            To edit field requires Editor access?
  3090. HTITEM_READERS            Reader Names field?
  3091. Use the HTNAME_REF constant (defined as $REF) with the HTTYPE_REF data type to retrieve and insert reference items for response documents.
  3092. htItemList returns the following form attribute structure:
  3093. typedef struct
  3094.   HTTYPE type;                /* Item data type */
  3095.   char name [HTLEN_FIELDNAME + 1];    /* Item name */
  3096.   HTFLAGS flags;                /* Item flags (HTITEM_xxx) */?
  3097.   HTINT length;                /* Item value length */
  3098.   void *value;                /* Item value (if requested) */?
  3099. } HTITEM;                    /* Item summary structure */
  3100. The item group contains the following functions:
  3101. htItemBind        Binds an item name to a program variable
  3102. htItemCount        Obtains the number of items in a document
  3103. htItemDelete        Deletes an item from a document?
  3104. htItemFetch        Converts and retrieves the data for an item into a supplied buffer?
  3105. htItemGetInfo        Obtains a piece of information about a document item?
  3106. htItemGetPtr        Returns a pointer to an items data converted to a specified type
  3107. htItemLength        Obtains the length of an item as converted to a specified data type?
  3108. htItemList        Iterates through items in a document
  3109. htItemPut        Writes an item to a document, overwriting any existing item of the same name?
  3110. htItemUnbind        Removes the binding of an item name?
  3111. cursor
  3112.     The cursor containing the desired index.?
  3113.     itemname?
  3114.     The name of the item to bind. When strict binding is in effect, this item must exist as a field in the active form.
  3115.     type?
  3116.     The data type for data in the supplied buffer. When fetching, HiTest converts the item data to this type before copying it into the buffer. When storing (with htDocPut or htDocUpdate), HiTest converts data from this type to the items type before writing it to the document. This enables automatic conversion between an items data and the supplied buffer. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the itemtype parameter).
  3117.     length?
  3118.     The maximum length of the supplied buffer. Use zero when a buffer is known to be of sufficient length. HiTest ignores this value when storing data (with htDocPut or htDocUpdate).?
  3119.     itemtype?
  3120.     The data type of the item. When strict binding is active, use either zero or the data type of the corresponding field in the form. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the type parameter).
  3121.     buffer?
  3122.     The buffer into which to fetch or store data for this item.
  3123.     datalen
  3124.     The buffer to use to specify a specific items data length. When fetching the item, HiTest sets this value to the length of the data written to the data buffer. When storing the item (with htDocPut or htDocUpdate), set this value to nonzero to supply the length of the item value. A value of zero directs HiTest to determine the length. Use NULL to omit this functionality.?
  3125.     nullind
  3126.     The buffer to use to specify a specific items null indicator. When fetching an item not in the document, HiTest sets this value to TRUE (otherwise FALSE). When storing the item (with htDocPut or htDocUpdate), setting this value to TRUE results in a NULL item (i.e., HiTest does not store the item in the document) regardless of other values. Use NULL to omit this functionality.?
  3127.     update?
  3128.     The buffer to use to specify a specific items update indicator. When fetching the item, HiTest sets this value to FALSE. Setting this value to TRUE and then calling htDocUpdate directs HiTest to write the new item value back to the fetched document. Bind multiple items with the same update indicator buffer to perform multiple item updates by setting a single update indicator to TRUE and calling htDocUpdate. Use NULL to omit this functionality.
  3129. HTSTATUS htItemBind (cursor, itemname, type, length,
  3130.                    itemtype, buffer, datalen, nullind,
  3131.                    update);?
  3132.     HTCURSOR    cursor;         /* Input */?
  3133.     char        *itemname;         /* Input */?
  3134.     HTTYPE    type;         /* Input, Optional */?
  3135.     HTINT        length;         /* Input, Optional */?
  3136.     HTTYPE    itemtype;         /* Input, Optional */?
  3137.     void        *buffer;         /* Input */?
  3138.     HTINT        *datalen;         /* Input, Optional */?
  3139.     HTBOOL    *nullind;         /* Input, Optional */?
  3140.     HTBOOL    *update;         /* Input, Optional */
  3141. dochand?
  3142.     The document from which to obtain the item count.
  3143.     itemcount
  3144.     The buffer to receive the number of items in the document.?
  3145. HTSTATUS htItemCount (dochand, itemcount);
  3146.     HTDOCHANDLE        dochand;         /* Input */
  3147.     HTINT            *itemcount;     /* Output */
  3148. FunctionhtItemCountObtains the number of items in a document.
  3149. Obtains the number of items in the document, including composite items and excluding file attachments. HiTest counts (and handles with the htComp functions) all composite items of the same name as one item. This count does not include file attachments, which are handled with the htFile functions.HTSTATUS return code. Failures include:
  3150.         HTFAIL_INVALID_DOCUMENT (invalid document handle).HTINT count;
  3151.         HTSTATUS status;
  3152.         status = htItemCount (dochand, &count);htItemListItem
  3153. ##########################################################
  3154. FunctionhtItemDeleteDeletes an item from a document.
  3155. Deletes an item from a document. This function does not work on file attachments (use the htFile functions to manipulate or delete file attachments). Deleting a composite item deletes all items of that name from the document (HiTest considers all composite items of the same name as single item). Deleting an open composite item (i.e., represented by a valid composite handle) invalidates that composite handle.HTSTATUS return code. Failures include:
  3156.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  3157.         HTFAIL_INVALID_FIELD (field is not in the documents form);
  3158.         HTFAIL_INVALID_ITEM (item does not exist in the document).HTSTATUS status;
  3159.         status = htItemDelete (dochand, "Date");htDocCloseItem################################
  3160. FunctionhtItemFetchConverts and retrieves the data for an item into a supplied buffer.
  3161. Transfers the items data from a document item to a supplied buffer. If requested, HiTest converts the data before writing it to the buffer. Use htItemLength to determine the required buffer length. To have HiTest manage the buffer, use the similar htItemGetPtr function.HTSTATUS return code. Failures include:
  3162.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  3163.         HTFAIL_INVALID_FIELD (field is not in the documents form);
  3164.         HTFAIL_INVALID_ITEM (item does not exist in the document);
  3165.         HTFAIL_INVALID_CONVERT (item type does not convert to requested type);
  3166.         HTFAIL_OVERFLOW (retrieved data does not fit in supplied buffer).char buffer [HTLEN_DATETIME_TEXT + 1];
  3167.         HTTYPE type = HTTYPE_TEXT, itemtype = HTTYPE_DATETIME;
  3168.         HTINT length = 0;
  3169.         HTSTATUS status;
  3170.         status = htItemFetch (dochand, "Date", &type, &length,
  3171.                                     &itemtype, buffer);htItemLength, htItemGetPtrItem####################
  3172. FunctionhtItemGetInfoObtains a piece of information about a document item.
  3173. Fetches one of various item-level information items into a supplied buffer. Each item has a data type, and the buffer must be sufficiently large to hold the result.HTSTATUS return code. Failures include:
  3174.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  3175.         HTFAIL_INVALID_ITEM (item does not exist in the document);
  3176.         HTFAIL_ILLEGAL_ENUM (invalid item parameter).HTFLAGS flags;
  3177.         HTSTATUS status;
  3178.         status = htItemGetInfo (dochand, "Date", HTITEMINFO_FLAGS,
  3179.                                         &flags);htItemListItem####################################################
  3180. FunctionhtItemGetPtrReturns a pointer to an items data converted to a specified type.
  3181. Transfers the items data from a document item to a buffer allocated and managed by HiTest. If requested, HiTest converts the data before writing it to the buffer. The calling program cannot modify the contents of this buffer, and HiTest frees the buffer when closing the document. To fetch data into a buffer managed by the calling program, use the similar htItemFetch function.HTSTATUS return code. Failures include:
  3182.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  3183.         HTFAIL_INVALID_FIELD (field is not in the documents form);
  3184.         HTFAIL_INVALID_ITEM (item does not exist in the document);
  3185.         HTFAIL_INVALID_CONVERT (item type does not convert to requested type).char *buffer;
  3186.         HTTYPE type = HTTYPE_TEXT, itemtype = HTTYPE_DATETIME;
  3187.         HTINT length;
  3188.         HTSTATUS status;
  3189.         status = htItemGetPtr (dochand, "Date", &type, &length,
  3190.                                      &itemtype, &buffer);htItemFetchItem############################
  3191. FunctionhtItemLengthObtains the length of an item as converted to a specified data type.
  3192. Obtains the length of an items data as converted to a specified data type. Use this length to provide a buffer of the proper length for htItemFetch.HTSTATUS return code. Failures include:
  3193.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  3194.         HTFAIL_INVALID_FIELD (field is not in the documents form);
  3195.         HTFAIL_INVALID_ITEM (item does not exist in the document).HTTYPE type = HTTYPE_TEXT, itemtype = HTTYPE_DATETIME;
  3196.         HTINT length;
  3197.         HTSTATUS status;
  3198.         status = htItemLength (dochand, "Date", &type, &itemtype,
  3199.                                      &length);htItemFetchItem#############################################
  3200. FunctionhtItemListIterates through items in a document.
  3201. Returns the first or next item information from the list of items in the document. This function also optionally obtains a read-only pointer to the items value.HTSTATUS return code. Failures include:
  3202.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  3203.         HTFAIL_END_OF_DATA (no more items).HTITEM item;
  3204.         HTSTATUS status;
  3205.         status = htItemList (dochand, FALSE, TRUE, &item);htItemCount, htItemGetInfoItem###
  3206. FunctionhtItemPutWrites an item to a document, overwriting any existing item of the same name.
  3207. Writes data from a buffer to a document item. If requested, HiTest converts the data before writing it to the document. This function deletes any existing item of the same name.HTSTATUS return code. Failures include:
  3208.         HTFAIL_INVALID_DOCUMENT (invalid document handle);
  3209.         HTFAIL_INVALID_FIELD (field is not in the documents form);
  3210.         HTFAIL_INVALID_CONVERT (type does not convert to item type).HTSTATUS status;
  3211.         status = htItemPut (dochand, "Date", HTTYPE_TEXT, 0,
  3212.                                   HTTYPE_DATETIME, "1/29/66");htItemFetch, htDocCloseItem######
  3213. FunctionhtItemUnbindRemoves the binding of an item name.
  3214. Cancels the effects of any htItemBind performed with the same item name. Producing a new index automatically cancels all bindings.HTSTATUS return code. Failures include:
  3215.         HTFAIL_INVALID_CURSOR
  3216.         HTFAIL_INVALID_ITEM (no such item bound).HTSTATUS status;
  3217.         status = htItemUnbind (cursor, "Date");htItemBind, htDocFetch, htCurResetItem###############
  3218. FunctionhtMacroCopyCopies a macro from one cursor to another.
  3219. Copies a macro between cursors, optionally assigning a new name. Notes requires macro names within a database to be unique.HTSTATUS return code. Failures include:
  3220.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3221.         HTFAIL_INVALID_MACRO (source macro does not exist);
  3222.         HTFAIL_DUPLICATE (a macro exists in the destination cursor with the same title);
  3223.         HTFAIL_OVERFLOW (new macro title is too long).HTMACROID new_macroid;
  3224.         HTSTATUS status;
  3225.         status = htMacroCopy (cursor1, macroid, cursor2, "NewMacro",
  3226.                                     &new_macroid);htMacroGetId, htMacroDeleteMacro####
  3227. FunctionhtMacroDeleteDeletes a macro from a database.
  3228. Deletes a macro from a database.HTSTATUS return code. Failures include:
  3229.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3230.         HTFAIL_INVALID_MACRO (macro does not exist);HTSTATUS status;
  3231.         status = htMacroDelete (cursor, macroid);htMacroGetId, htMacroCopyMacro#####################################
  3232. ihA[*
  3233. FunctionhtMacroExecExecutes a macro.
  3234. Executes a macro within a cursor. Notes macros contain execution parameters and a formula. The execution parameters define where to run the macro, the documents on which to run the macro, and how to affect documents. Where to run a macro (e.g., from the Notes UI menu; as a background macro; etc.) is not relevant to this function. The other options have a significant effect on this function.
  3235.         All macros define a set of documents on which to run. The following list defines the effect of this option:
  3236. 1)        Run on all documents in database: Run the macro on all documents in the database. This option operates the same in HiTest as in the Notes UI.
  3237. 2)        Run on documents not yet processed by macro: Run the macro on all documents in the database on which it has not previously been run. This option operates the same in HiTest as in the Notes UI.
  3238. 3)        Run on documents not yet marked read by you: Run the macro on all documents in the database, since Notes user unread information is only available in the Notes UI. This option does not operate the same in HiTest as in the Notes UI.
  3239. 4)        Run on all documents in view: Run the macro on all documents in the current view-based index. Requires an active view-based index. This option operates the same in HiTest as in the Notes UI. Search macros created from the Notes UI use this option.
  3240. 5)        Run on selected documents in view: Run the macro on all documents in the current index, since selected information is a property of the Notes UI. Run against either a view-based or flat index, or against the entire database if there is no active index. This option does not operates the same in HiTest as in the Notes UI.
  3241.         All macros define an operation to perform on a subset of documents which the macro runs against. The following list describes the effect of this option:
  3242. 1)        Update existing document when run: Modify documents affected by the macro. This option operates the same in HiTest as in the Notes UI.
  3243. 2)        Select document when run: Produce a new flat index from documents selected by the macro. This option destroys any existing index. This option provides the same basic selection functionality as in the Notes UI, differing only in the presentation of results (on-screen selection is a property of the Notes UI).
  3244. 3)        Create new document when run: Create new documents with relevant modifications from documents affected by the macro. This option operates the same in HiTest as in the Notes UI.
  3245. Due to anomalous behavior in the standard Notes V3 API, macros which perform document deletion (i.e., use the @DeleteDocument function) may not delete documents. To work around this problem, rewrite the macro formula and embed the deletion in an @If function. For example, the formula
  3246.         SELECT Form = "FormName"; @DeleteDocument"
  3247.  will not work, but the formula
  3248.         SELECT @If (Form = "FormName"; @DeleteDocument; "")
  3249. will successfully delete the proper documents.HTSTATUS return code. Failures include:
  3250.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3251.         HTFAIL_INVALID_MACRO (macro does not exist or is invalid);
  3252.         HTFAIL_DATA_UNAVAIL (macro requires an active index);HTINT total_count, action_count;
  3253.         HTSTATUS status;
  3254.         status = htMacroExec (cursor, macroid, &total_count,
  3255.                                     &action_count);htMacroList, htMacroGetId, htViewSet, htFormulaExec, htIndexNavigateMacro#######
  3256. FunctionhtMacroGetIdObtains a macro ID from the macro name.
  3257. Given a macro name, obtains the macro ID of the indicated macro.HTMACROID for the requested macro. Returns NULLID if the macro does not exist.HTMACROID macroid;
  3258.         macroid = htMacroGetId (cursor, "Memo");htMacroList, htMacroExecMacro
  3259. ##########################################################
  3260. FunctionhtMacroListIterates through macros in a database.
  3261. Returns the first or next macro summary information from the list of macros in the cursors database.HTSTATUS return code. Failures include:
  3262.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3263.         HTFAIL_END_OF_DATA (no more macros).HTMACROSUMM macrosumm;
  3264.         HTSTATUS status;
  3265.         status = htMacroList (cursor, HTLIST_NEXT, ¯osumm);htMacroGetId, htMacroExecMacro########################################################
  3266. FunctionhtMailSendSends a mail message.
  3267. Creates and sends a mail message, using data from various sources. The contents of the message can come from an existing document, a C structure, bound items, or from any combination of these sources. Items in any existing document supersede all others, and items in the C structure supersede bound items (e.g., if the subject is in all three places, HiTest uses the value in the document). Every mail message must have at least one valid addressee in the SendTo item. The ability to sign or encrypt mail is unavailable since this functionality is not currently available in the standard Lotus Notes API.HTSTATUS return code.         Failures include:
  3268.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3269.         HTFAIL_DATA_UNAVAIL (no data to send or no SendTo value);
  3270.         HTFAIL_INVALID_DATABASE (cannot find mail database to save message in);
  3271.         HTFAIL_INVALID_FORM (cannot find form to embed);
  3272.         HTFAIL_INVALID_DOCUMENT (embed form requires a valid maildoc).HTSTATUS status;
  3273.         HTMEMO memo;
  3274.         memset (&memo, 0, sizeof (HTMEMO));
  3275.         memo.sendto = "David Letterman";
  3276.         memo.subject = "Stupid Pet Tricks";
  3277.         status = htMailSend (cursor, NULLID, &memo,
  3278.                                    HTMAIL_SAVE | HTMAIL_RETURN_RECEIPT);htCurOpen, htItemBindMail######################################################
  3279. ObjectTextList##################
  3280. ObjectView######################
  3281. FunctionhtTextListCountReturns the number of text elements in a text list.
  3282. Returns the number of text elements in a text list.HTINT number of text elements in the text list.HTINT count;
  3283.         count = htTextListCount (textlist_ptr);htTextListLength, htTextListFetch, htTextListGetPtrTextList###
  3284. dochand?
  3285.     The document containing the item.
  3286.     itemname?
  3287.     The name of the item to delete. When strict binding is in effect, this item must exist as a field in the documents form.?
  3288. HTSTATUS htItemDelete (dochand, itemname);
  3289.     HTDOCHANDLE        dochand;         /* Input */
  3290.     char            *itemname;         /* Input */
  3291. dochand?
  3292.     The document containing the item.
  3293.     itemname?
  3294.     The name of the item to fetch. When strict binding is in effect, this item must exist as a field in the documents form.
  3295.     type?
  3296.     The data type representing the type of data retrieved -- HiTest converts the item to this type. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the itemtype parameter) and to return the items type in this location.?
  3297.     length?
  3298.     The length of the supplied buffer. A value zero or a NULL pointer indicates that the buffer is large enough to hold the result data. A value of zero directs HiTest to return the length of data retrieved in this location. Use htItemLength to determine the length before retrieving the data. A length which is insufficient to contain the result is valid only when the destination type is HTTYPE_TEXT and the global option TEXT_TRUNCATE is active. In this case, the resulting text is truncated to fit in the buffer.?
  3299.     itemtype?
  3300.     The data type of the item. When strict binding is active, use either zero or the data type of the corresponding field in the form. When strict binding is inactive, use either zero or the data type of the item within the document. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the type parameter) and to return the items type in this location.?
  3301.     buffer?
  3302.     The buffer to receive the converted data value.
  3303. HTSTATUS htItemFetch (dochand, itemname, type, length,
  3304.                     itemtype, buffer);
  3305.     HTDOCHANDLE        dochand;     /* Input */?
  3306.     char            *itemname;     /* Input */?
  3307.     HTTYPE        *type;     /* Input/Output, Optional */?
  3308.     HTINT            *length;     /* Input/Output, Optional */?
  3309.     HTTYPE        *itemtype;     /* Input/Output, Optional */?
  3310.     void            *buffer;     /* Output */
  3311. dochand?
  3312.     The document containing the item.
  3313.     itemname?
  3314.     The name of the desired item within the form.
  3315.     item?
  3316.     One value from an enumeration of item information values. Each value corresponds to a type (and length, for variable length types). The following table lists legal values with their corresponding data types and, where relevant, lengths:?
  3317. constant                    type                    
  3318. HTITEMINFO_TYPE            HTTYPE
  3319.     HTITEMINFO_FLAGS            HTFLAGS?
  3320.     HTITEMINFO_LENGTH            HTINT
  3321.     TYPE obtains the items data type;
  3322.     FLAGS obtains the items flags;?
  3323.     LENGTH obtains the items data length, in its stored format.
  3324.     buffer?
  3325.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  3326. HTSTATUS htItemGetInfo (dochand, itemname, item, buffer);?
  3327.     HTDOCHANDLE        dochand;         /* Input */
  3328.     char            *itemname;         /* Input */
  3329.     HTITEMINFO        item;         /* Input */
  3330.     void            *buffer;         /* Output */?
  3331. dochand?
  3332.     The document containing the item.
  3333.     itemname?
  3334.     The name of the item to fetch. When strict binding is in effect, this item must exist as a field in the documents form.
  3335.     type?
  3336.     The data type representing the type of data retrieved -- HiTest converts the item to this type. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the itemtype parameter) and to return the items type in this location.?
  3337.     length?
  3338.     The buffer to receive the length of the retrieved data.
  3339.     itemtype?
  3340.     The data type of the item. When strict binding is active, use either zero or the data type of the corresponding field in the form. When strict binding is inactive, use either zero or the data type of the item within the document. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the type parameter) and to return the items type in this location.?
  3341.     buffer?
  3342.     The buffer to receive the pointer to the converted data value. Do not modify or free this data.
  3343. HTSTATUS htItemGetPtr (dochand, itemname, type, length,?
  3344.                      itemtype, buffer);?
  3345.     HTDOCHANDLE        dochand;     /* Input */?
  3346.     char            *itemname;     /* Input */?
  3347.     HTTYPE        *type;     /* Input/Output, Optional */?
  3348.     HTINT            *length;     /* Output, Optional */?
  3349.     HTTYPE        *itemtype;     /* Input/Output, Optional */?
  3350.     void            **buffer;     /* Output */?
  3351. dochand?
  3352.     The document containing the item.
  3353.     itemname?
  3354.     The name of the item whose length is to be determined. When strict binding is in effect, this item must exist as a field in the documents form.
  3355.     type?
  3356.     The data type representing the destination type -- the length returned is the length of the item as converted to this type. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the itemtype parameter) and to return the items type in this location.?
  3357.     itemtype?
  3358.     The data type of the item. When strict binding is active, use either zero or the data type of the corresponding field in the form. When strict binding is inactive, use either zero or the data type of the item within the document. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type must be supplied in the type parameter) and to return the items type in this location.?
  3359.     length?
  3360.     The buffer to receive the data length. This is the length of the data as converted to the requested type.
  3361. HTSTATUS htItemLength (dochand, itemname, type, itemtype,?
  3362.                      length);?
  3363.     HTDOCHANDLE        dochand;     /* Input */?
  3364.     char            *itemname;     /* Input */?
  3365.     HTTYPE        *type;    /* Input/Output, Optional */
  3366.     HTTYPE        *itemtype;     /* Input/Output, Optional */?
  3367.     HTINT            *length;     /* Output */?
  3368. dochand?
  3369.     The document from which to list items.?
  3370.     first
  3371.     Whether to get the first or next item. TRUE resets the item list, FALSE simply obtains the next item in the list. The value is always TRUE on the first call for a given document handle.
  3372.     getvalue?
  3373.     Whether to obtain a read-only pointer to the items value. The pointer is in the HTITEM structure, and must not be modified or freed by the calling program. The pointer becomes invalid when the document is closed.?
  3374.     item?
  3375.     The structure to receive information on the item. The item information consists of the item name, item data type, item flags, and length and value pointer. Use a getvalue parameter value of TRUE to retrieve the length and value results (otherwise they are zero and NULL, respectively).
  3376. HTSTATUS htItemList (dochand, first, getvalue, item);?
  3377.     HTDOCHANDLE        dochand;         /* Input */
  3378.     HTBOOL        first;         /* Input */?
  3379.     HTBOOL        getvalue;         /* Input */
  3380.     HTITEM        *item;         /* Output */
  3381. dochand?
  3382.     The document to receive the new item.
  3383.     itemname?
  3384.     The name of the item to put. When strict binding is in effect, this item must exist as a field in the documents form.
  3385.     type?
  3386.     The data type representing the type of data in the buffer -- HiTest converts the data from this type to the items type.
  3387.     length?
  3388.     The length of the supplied data. A value zero directs HiTest to determine the length.
  3389.     itemtype?
  3390.     The data type of the item. When strict binding is active, use either zero or the data type of the corresponding field in the form. When strict binding is inactive, use either zero or the data type of the item within the document. A value of zero directs HiTest to use the items data type (if strict binding is inactive, the items data type is supplied in the type parameter).
  3391.     buffer?
  3392.     The buffer containing the items new value.?
  3393. HTSTATUS htItemPut (dochand, itemname, type, length,
  3394.                   itemtype, buffer);
  3395.     HTDOCHANDLE        dochand;         /* Input */
  3396.     char            *itemname;         /* Input */
  3397.     HTTYPE        type;         /* Input */
  3398.     HTINT            length;         /* Input, Optional */
  3399.     HTTYPE        itemtype;         /* Input, Optional */
  3400.     void            *buffer;         /* Input */
  3401. cursor
  3402.     The cursor used in the binding operation.
  3403.     itemname?
  3404.     The name of the item used in the binding operation.
  3405. HTSTATUS htItemUnbind (cursor, itemname);?
  3406.     HTCURSOR    cursor;         /* Input */?
  3407.     char        *itemname;         /* Input */?
  3408. A macro is a stored set of formulas which perform an action. Each database contains zero or more macros. A macro runs against either all or some of the documents in a database. In addition, a macro may select or modify existing documents or create new documents. A search macro also performs a full text search. The primary attributes of a macro are a name and ID. HiTest uses the constant NULLID to represent an invalid macro ID.
  3409. htMacroList returns the following macro summary structure:
  3410. typedef struct
  3411.   HTMACROID macroid;            /* Macro ID */?
  3412.   HTBOOL hidden;                /* Whether macro is hidden in UI */?
  3413.   char name [HTLEN_DESIGNNAME + 1];            /* Macro name */
  3414.   char display_name1 [HTLEN_DISPLAYNAME + 1];    /* Primary display
  3415.                                    name */
  3416.   char display_name2 [HTLEN_DISPLAYNAME + 1];    /* Secondary display
  3417.                                    name */
  3418. } HTMACROSUMM;                /* htMacroList summary structure */?
  3419. The three name fields in the HTMACROSUMM structure handles Notes multiple naming of objects. Macros may have multiple names, and the first name may consists of two parts. The ?
  3420.  field contains the string which Notes uses internally to refer to a given macro. The 
  3421. display_name1?
  3422.  field contains the name which appears in the Notes UI. For a cascading macro name, the 
  3423. display_name2?
  3424.  field contains the cascading component of the Notes UI name. When a macro has only one name, the 
  3425.  field is equal to either 
  3426. display_name1?
  3427.  (if not cascading) or ?
  3428. display_name1?
  3429. display_name2?
  3430.  (if cascading). The hidden field indicates whether Notes normally displays the macro in the Notes UI Run-Macro menu. A hidden macro has its Include in Tools Run Macros Menu option unchecked.?
  3431. The macro group contains the following functions:?
  3432. htMacroCopy        Copies a macro from one cursor to another
  3433. htMacroDelete        Deletes a macro from a database
  3434. htMacroExec        Executes a macro?
  3435. htMacroGetId        Obtains a macro ID from the macro name
  3436. htMacroList        Iterates through macros in a database
  3437. src_cursor
  3438.     The cursor from which to copy the macro.?
  3439.     src_macroid
  3440.     The macro to copy within the source cursor.
  3441.     dest_cursor
  3442.     The cursor into which to copy the new macro.?
  3443.     dest_macroname?
  3444.     The name for the new macro in the destination cursor. To keep the original name, use NULL or the empty string. Otherwise, the name formatting follows the Notes UI rules (display_name1\display_name2 | name -- see the Lotus Notes Application Developers Reference). A new name is required when the source and destination cursors are the same.
  3445.     dest_macroid?
  3446.     The buffer which receives the macro ID for the new macro.
  3447. HTSTATUS htMacroCopy (src_cursor, src_macroid, dest_cursor,?
  3448.                     dest_macroname, dest_macroid);
  3449.     HTCURSOR    src_cursor;         /* Input */?
  3450.     HTMACROID    src_macroid;         /* Input */?
  3451.     HTCURSOR    dest_cursor;         /* Input */
  3452.     char        *dest_macroname;         /* Input, Optional */?
  3453.     MACROID    *dest_macroid;         /* Output, Optional */
  3454. cursor
  3455.     The cursor containing the macro.?
  3456.     macroid
  3457.     The macro to delete.?
  3458. HTSTATUS htMacroDelete (cursor, macroid);?
  3459.     HTCURSOR    cursor;         /* Input */?
  3460.     HTMACROID    macroid;         /* Input */?
  3461. cursor
  3462.     The cursor containing the macro.?
  3463.     macroid
  3464.     The macro to execute.
  3465.     total_count
  3466.     Buffer to receive the total number of documents selected by the macro. For macros which modify documents, this is not necessarily equivalent to the total number of documents affected (see action_count parameter).?
  3467.     action_count?
  3468.     Buffer to receive the total number of documents acted on by the macro. For a selection macro, this is the same as total_count. For macros which modify or create documents, this is the number of documents modified or created, which is equal to or less than the value for the total_count parameter.?
  3469. HTSTATUS htMacroExec (cursor, macroid, total_count,?
  3470.                     action_count);
  3471.     HTCURSOR    cursor;        /* Input */
  3472.     HTMACROID    macroid;        /* Input */
  3473.     HTINT        *total_count;    /* Output, Optional */
  3474.     HTINT        *action_count;    /* Output, Optional */?
  3475. cursor
  3476.     The cursor containing the macro.?
  3477.     macroname
  3478.     The macro name for which to obtain the ID.?
  3479. HTMACROID htMacroGetId (HTCURSOR cursor, char *macroname);
  3480.     HTCURSOR    cursor;         /* Input */?
  3481.     char        *macroname;     /* Input */?
  3482. cursor
  3483.     The cursor from which to list macros.
  3484.     operation
  3485.     An element of the HTLIST enumeration that indicates whether and how to reset the macro list. Use HTLIST_REFRESH to discard the macro list and obtain a new list from Notes. Use HTLIST_FIRST to set the next element in the list to the first element. Use HTLIST_NEXT to obtain the element following the previously fetched element. The first call to this function after opening the cursor always uses the value HTLIST_REFRESH.
  3486.     htmacrosumm
  3487.     The structure to receive the macros summary information. See the Macro object section preceding the htMacro functions for a description of this structure and its contents.
  3488. HTSTATUS htMacroList (cursor, operation, macrosumm);
  3489.     HTCURSOR        cursor;         /* Input */
  3490.     HTLIST        operation;         /* Input */?
  3491.     HTMACROSUMM        *macrosumm;     /* Output */?
  3492. Mail within Notes is usually the act of sending 
  3493. documents?
  3494.  of the form memo. Notes can actually send any ?
  3495. document
  3496. . The mail functions simplify sending mail ?
  3497. documents?
  3498. The following flags affect mail operations:?
  3499. HTMAIL_PRIORITY_LOW        Set mail priority to low?
  3500. HTMAIL_PRIORITY_HIGH        Set mail priority to high?
  3501. HTMAIL_REPORT_NONE        No delivery report
  3502. HTMAIL_REPORT_CONFIRM        Confirmed delivery report
  3503. HTMAIL_RETURN_RECEIPT        Request return receipt?
  3504. HTMAIL_SAVE                Save mail document?
  3505. HTMAIL_SAVE_MAILDB        Save mail document in Notes users mail database?
  3506. HTMAIL_BOUND_ITEMS        Add bound items to mail document
  3507. HTMAIL_EMBED_FORM        Embed form within mail document
  3508. The following item name constants define common mail items:?
  3509. HTMAIL_ITEM_SENDTO        SendTo
  3510. HTMAIL_ITEM_COPYTO        CopyTo
  3511. HTMAIL_ITEM_BLINDCOPYTO        BlindCopyTo
  3512. HTMAIL_ITEM_SUBJECT        Subject
  3513. HTMAIL_ITEM_BODY            Body?
  3514. HTMAIL_ITEM_DELIVERYPRIORITY    DeliveryPriority?
  3515. HTMAIL_ITEM_DELIVERYREPORT    DeliveryReport?
  3516. HTMAIL_ITEM_RETURNRECEIPT    ReturnReceipt?
  3517. htMailSend uses the following structure to easily submit common mail items and simple mail messages to the htMailSend function:?
  3518. typedef struct
  3519.   char *sendto;            /* Separate names with semicolons?
  3520.                        or commas */
  3521.   char *copyto;            /* Separate names with semicolons?
  3522.                        or commas */
  3523.   char *blindcopyto;        /* Separate names with semicolons?
  3524.                        or commas */
  3525.   char *subject;            /* Subject field */
  3526.   char *body_text;        /* If this is NULL, use body_comp */
  3527.   HTCOMPHANDLE body_comp;    /* If this is NULL, use body_text */
  3528. } HTMEMO;                /* Simple mail memo structure */?
  3529. The mail group contains the following function:?
  3530. htMailSend        Sends a mail message
  3531. cursor
  3532.     The cursor in which to base the message document. This is the source for the maildoc and bound items, if given. The HTMAIL_SAVE flag saves the mail document into this database.?
  3533.     maildoc
  3534.     The document to send. HiTest adds data from the other sources to this document before sending the message. If there is no base document use NULLID and HiTest will create a new document. HiTest requires this parameter with the HTMAIL_EMBED_FORM flag. Embedding a form removes the Form item from the document, and embeds the form data itself within the document. Use form embedding when sending a document of a form which is not available in the recipients mail database. Otherwise, when the recipient opens the received document, the form is unavailable and Notes cannot properly display the document.?
  3535.     memo?
  3536.     The C structure that contains standard memo items. HiTest adds these items to the message document. Using this structure and no other data sources is an easy way to send messages with the standard items. When using information from this structure to create a mail message with no base document (i.e., the maildoc parameter is NULL), the created document is of form Memo. Programs must set all unused fields in this structure to NULL. See the Mail object section preceding the htMail functions for a description of this structure and its contents.?
  3537.     flags
  3538.     Zero or more HTMAIL flags OR-ed together. The HTMAIL_BOUND_ITEMS flag directs HiTest to insert bound items into the message (they are not added otherwise). The HTMAIL_EMBED_FORM flag directs HiTest to embed the mail documents form within the mail message (see maildoc parameter above). The HTMAIL_SAVE flag directs HiTest to save a copy of the mailed document in the supplied cursors database. The HTMAIL_SAVE_MAILDB flag directs HiTest to save a copy of the mailed document in the Notes users mail database. See the Mail object section preceding the htMail functions for a list and description of mail flags.
  3539. HTSTATUS htMailSend (cursor, maildoc, memo, flags);?
  3540.     HTCURSOR    cursor;         /* Input */?
  3541.     HTDOCID    maildoc;         /* Input, Optional */?
  3542.     HTMEMO    *memo;         /* Input, Optional */
  3543.     HTFLAGS    flags;         /* Input */?
  3544. The server object has no context beneath the process level, but represents Lotus Notes servers as distinct objects. HiTest normally represents the local or NULL server by a NULL or empty string. Programs may assign an alternate value for the local server with the htSetOption function and HTGLOBOPT_LOCAL_SERVERNAME enumeration (e.g., the Lotus Notes UI would use the value "Local"). The primary attribute of a server is the server name.?
  3545. Remote Notes databases are accessed through a server, which imposes Notes security restrictions on those databases. The server functions support access to basic server information and the ability to execute commands as if entering them at the Notes server.
  3546. The server group contains the following functions:
  3547. htServerExec        Remotely executes a Notes server console command
  3548. htServerGetInfo        Obtains a piece of information from and about a server?
  3549. htServerList        Iterates through available Notes servers
  3550. server
  3551.     The server on which to execute the command.
  3552.     command
  3553.     The command to execute on the server. See the Lotus Notes Administrator Guide for a list of valid server console commands.?
  3554. HTSTATUS htServerExec (server, command);
  3555.     char        *server;         /* Input */?
  3556.     char        *command;         /* Input */
  3557. server
  3558.     The server about which to obtain information.
  3559.     item?
  3560.     One value from an enumeration of server items. Each item corresponds to a type (and length, for variable length types). The following table lists legal items with their corresponding data types and, where relevant, lengths:
  3561. constant                    type                    
  3562. HTSERVINFO_PING            HTBOOL
  3563.     HTSERVINFO_RESPLEN        HTINT
  3564.     HTSERVINFO_RESPSTR        char [HTSERVINFO_RESPLEN]
  3565.     PING determines whether the server is available;?
  3566.     RESPLEN obtains the length of the servers response from the most recent htServerExec;
  3567.     RESPSTR obtains the text of the servers response from the most recent htServerExec.
  3568.     buffer?
  3569.     The buffer to receive the requested information. This buffer should be of sufficient length to handle the result.
  3570. HTSTATUS htServerGetInfo (server, item, buffer);
  3571.     char        *server;         /* Input */?
  3572.     HTSERVINFO    item;         /* Input */?
  3573.     void        *buffer;         /* Output */
  3574. operation?
  3575.     An element of the HTLIST enumeration that indicates whether and how to reset the server list. Use HTLIST_REFRESH to discard the server list and obtain a new list from Notes. Use HTLIST_FIRST to set the next element in the list to the first element. Use HTLIST_NEXT to obtain the element following the last fetched element. The first call to this function following htInit always uses the value HTLIST_REFRESH.
  3576.     server?
  3577.     A character buffer which receives the server name. The constant HTLEN_SERVERNAME defines the maximum server name length.?
  3578. HTSTATUS htServerList (operation, server);
  3579.     HTLIST    operation;         /* Input */
  3580.     char        *server;         /* Output */
  3581. Use text list functions to access the components of text list 
  3582. items?
  3583. . These functions provide simple interfaces to access the elements of a text list. See the Data Types section of Chapter 3, Programming to the HiTest API for a description of text list data.
  3584. The text list group contains the following functions:?
  3585. htTextListCount        Returns the number of text elements in a text list?
  3586. htTextListFetch        Copies a text list element into a supplied buffer
  3587. htTextListGetPtr        Returns a pointer to a text list element
  3588. htTextListLength        Returns the length of either one text list element, or the entire text list?
  3589. textlist
  3590.     A pointer to the text list data. 
  3591. HTSTATUS htTextListCount (textlist);
  3592.     void        *textlist;         /* Input */?
  3593. textlist
  3594.     A pointer to the text list data. 
  3595.     index
  3596.     The index of the text list element to copy into the supplied buffer. The first element is one. Use htTextListCount to obtain the last elements index.
  3597.     buffer?
  3598.     The buffer into which to copy the text element. This buffer must be of sufficient length. Use htTextListLength to determine the length of a specific text list element.
  3599. HTINT htTextListFetch (textlist, index, buffer);
  3600.     void        *textlist;         /* Input */?
  3601.     HTINT        index;         /* Input */
  3602.     char        *buffer;         /* Output */
  3603. textlist
  3604.     A pointer to the text list data. 
  3605.     index
  3606.     The index of the text list element to obtain. The first element is one. Use htTextListCount to obtain the last elements index.?
  3607.     length?
  3608.     The buffer to receive the length of the text element at the pointer returned. HiTest sets this value to zero if the index is invalid.
  3609. char *htTextListGetPtr (textlist, index, length);?
  3610.     void        *textlist;         /* Input */?
  3611.     HTINT        index;         /* Input */
  3612.     HTINT        *length;         /* Output, Optional */?
  3613. textlist
  3614.     A pointer to the text list data. 
  3615.     index
  3616.     The index of the text list element whose length is to be determined. The first element is one. Use htTextListCount to obtain the last elements index. A value of zero determines the length of the entire text list.?
  3617. HTINT htTextListLength (textlist, index);?
  3618.     void        *textlist;         /* Input */?
  3619.     HTINT        index;         /* Input, Optional */
  3620. src_cursor
  3621.     The cursor from which to copy the view.
  3622.     src_viewid?
  3623.     The view to copy within the source cursor.?
  3624.     dest_cursor
  3625.     The cursor into which to copy the new view.
  3626.     dest_viewname
  3627.     The name for the new view in the destination cursor. To keep the original name, use NULL or the empty string. Otherwise, the name formatting follows the Notes UI rules (display_name1\display_name2 | name -- see the Lotus Notes Application Developers Reference). A new name is required when the source and destination cursors are the same.?
  3628.     dest_viewid
  3629.     The buffer which receives the view ID for the new view.
  3630. HTSTATUS htViewCopy (src_cursor, src_viewid, dest_cursor,?
  3631.                    dest_viewname,    dest_viewid);?
  3632.     HTCURSOR    src_cursor;         /* Input */?
  3633.     HTVIEWID    src_viewid;         /* Input */?
  3634.     HTCURSOR    dest_cursor;         /* Input */
  3635.     char        *dest_viewname;         /* Input, Optional */
  3636.     VIEWID    *dest_viewid;         /* Output, Optional */
  3637. cursor
  3638.     The cursor containing the view.
  3639.     viewid?
  3640.     The view to delete.
  3641. HTSTATUS htViewDelete (cursor, viewid);?
  3642.     HTCURSOR    cursor;         /* Input */?
  3643.     HTVIEWID    viewid;         /* Input */?
  3644. cursor
  3645.     The cursor containing the view.
  3646.     viewid?
  3647.     The view for which to obtain attributes.?
  3648.     view?
  3649.     The structure to receive view attributes. See the View object section preceding the htView functions for a description of this structure and its contents.?
  3650. HTSTATUS htViewGetAttrib (cursor, viewid, view);
  3651.     HTCURSOR    cursor;         /* Input */?
  3652.     HTVIEWID    viewid;         /* Input */?
  3653.     HTVIEW    *view;         /* Output */?
  3654. FunctionhtServerExecRemotely executes a Notes server console command.
  3655. Executes a command against the indicated Notes server as if entering that command into the servers console. Use htServerGetInfo to retrieve the results of the most recent htServerExec call. Successful use of this function requires administrator access. See the Lotus Notes Administrator Guide for the syntax of server console commands. Two powerful console commands which lend themselves to remote use are REPLICATE (to initiate replication remotely) and LOAD (to load a program remotely).HTSTATUS return code. Failures include:
  3656.         HTFAIL_DATA_UNAVAIL (the local server is invalid -- use a true server name).char *buffer;
  3657.         HTINT length;
  3658.         HTSTATUS status;
  3659.         status = htServerExec ("MyServer", "SHOW TASKS");
  3660.         if (!status)
  3661.         {
  3662.             status = htServGetInfo (cursor, HTSERVINFO_RESPLEN,
  3663.                                             &length);
  3664.             buffer = malloc (length + 1);
  3665.             status = htServGetInfo (cursor, HTSERVINFO_RESPSTR,
  3666.                                             buffer);
  3667.         }htServerList, htServerGetInfoServer#####################################
  3668. FunctionhtServerGetInfoObtains a piece of information from and about a server.
  3669. Fetches one of various server-level information items into a supplied buffer. Each item has a data type, and the buffer must be large enough to hold the result.HTSTATUS return code. Failures include:
  3670.         HTFAIL_DATA_UNAVAIL (current response results are not for the indicated server);
  3671.         HTFAIL_ILLEGAL_ENUM (invalid item).HTBOOL exists;
  3672.         HTSTATUS status;
  3673.         status = htServerGetInfo ("MyServer", HTSERVINFO_PING,
  3674.                                           &exists);htServerList, htServerExecServer##################
  3675. FunctionhtServerListIterates through available Notes servers.
  3676. Returns the first or next server name from the list of available Notes servers. The local server is normally not returned as a server. Assigning a local server name value with the htSetOption function will cause this function to return the local server string as the first server name in the server list.HTSTATUS return code. Failures include:
  3677.         HTFAIL_END_OF_DATA (no more servers).char server_name [HTLEN_SERVERNAME + 1];
  3678.         HTLIST list_op = HTLIST_FIRST;
  3679.         HTSTATUS status;
  3680.         printf ("List of Notes Servers:");
  3681.         while (!htServerList (list_op, server_name))
  3682.         {
  3683.             printf ("\n     '%s' ", server_name);
  3684.             list_op = HTLIST_NEXT;
  3685.         }htSetOptionServer##################################
  3686. FunctionhtTextListFetchCopies a text list element into a supplied buffer.
  3687. Copies the data for a specified text list element into a supplied buffer. To simply obtain a pointer to the data within the text list data itself, use the similar function htTextListGetPtr.HTINT length of the text copied into the buffer. Returns zero if index is invalid.char *buffer;
  3688.         HTINT length;
  3689.         buffer = malloc (htTextListLength (textlist_ptr, 1) + 1);
  3690.         length = htTextListFetch (textlist_ptr, 1, buffer);htTextListCount, htTextListLength, htTextListGetPtrTextList##################################################
  3691. FunctionhtTextListGetPtrReturns a pointer to a text list element.
  3692. Returns the pointer to a specified text list element, and obtains the length. Modifying data at this pointer would modify the data in the text list buffer, which is not a valid action on a text list obtained with a GetPtr function. To copy the data into a supplied buffer, use the similar function htTextListFetch.char * pointer to the text list element within the textlist data. Returns NULL if index is invalid.char *buffer;
  3693.         HTINT length;
  3694.         buffer = htTextListGetPtr (textlist_ptr, 1, &length);htTextListCount, htTextListLength, htTextListFetchTextList#############################################
  3695. FunctionhtTextListLengthReturns the length of either one text list element, or the entire text list.
  3696. Returns the length of either a single text list element, or the entire text list (depending on the element index).HTINT length of one element or the entire text list.HTINT length;
  3697.         length = htTextListLength (textlist_ptr, 1);htTextListCount, htTextListFetch, htTextListGetPtrTextList################################
  3698. ##########################################################
  3699. FunctionhtViewCopyCopies a view from one cursor to another.
  3700. Copies a view between cursors, optionally assigning a new name. Notes requires view names within a database to be unique.HTSTATUS return code. Failures include:
  3701.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3702.         HTFAIL_INVALID_VIEW (source view does not exist);
  3703.         HTFAIL_DUPLICATE (a view exists in the destination cursor with the same title);
  3704.         HTFAIL_OVERFLOW (new view title is too long).HTVIEWID new_viewid;
  3705.         HTSTATUS status;
  3706.         status = htViewCopy (cursor1, viewid, cursor2, "NewView",
  3707.                                    &new_viewid);htViewGetId, htViewDeleteView######################
  3708. FunctionhtViewDeleteDeletes a view from a database.
  3709. Deletes a view from a database. A cursors active view cannot be deleted.HTSTATUS return code. Failures include:
  3710.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3711.         HTFAIL_INVALID_VIEW (view does not exist);
  3712.         HTFAIL_ACTIVE_RESULT (cannot delete the active view).HTSTATUS status;
  3713.         status = htViewDelete (cursor, viewid);htViewGetId, htViewCopy, htViewSetView%
  3714. ##########################################################
  3715. FunctionhtViewGetAttribObtains the attributes of a view.
  3716. Obtains complete attributes for a view.HTSTATUS return code. Failures include:
  3717.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3718.         HTFAIL_INVALID_VIEW (view does not exist).HTVIEW view;
  3719.         HTSTATUS status;
  3720.         status = htViewGetAttrib (cursor, viewid, view);htViewList, htViewGetIdView####
  3721. FunctionhtViewGetIdObtains a view ID from the view name.
  3722. Given a view name, obtains the view ID of the indicated view.HTVIEWID for the requested view. Returns NULLID if the view does not exist.HTVIEWID viewid;
  3723.         viewid = htViewGetId (cursor, "All By Date");htViewList, htViewGetAttribView#
  3724. FunctionhtViewListIterates through views in a database.
  3725. Returns the first or next view information from the list of views within the cursors database.HTSTATUS return code. Failures include:
  3726.         HTFAIL_INVALID_CURSOR (invalid cursor);
  3727.         HTFAIL_END_OF_DATA (no more views).HTVIEWSUMM viewsumm;
  3728.         HTSTATUS status;
  3729.         status = htViewList (cursor, HTLIST_NEXT, &viewsumm);htViewGetAttribView################
  3730. Section3.  Programming to the HiTest API3.2  Program Flow
  3731. ###########################
  3732. ##########################################################
  3733. ##########################################################
  3734. ##########################################################
  3735. ##########################################################
  3736. ##########################################################
  3737. ##########################################################
  3738. ##########################################################
  3739. ##########################################################
  3740. ##########################################################
  3741. ##########################################################
  3742. ##########################################################
  3743. ##########################################################
  3744. ##########################################################
  3745. ##########################################################
  3746. ##########################################################
  3747. ##########################################################
  3748. ##########################################################
  3749. ##########################################################
  3750. ##########################################################
  3751. ##########################################################
  3752. ##########################################################
  3753. ##########################################################
  3754. ##########################################################
  3755. ##########################################################
  3756. ##########################################################
  3757. ##########################################################
  3758. ##########################################################
  3759. ##########################################################
  3760. ##########################################################
  3761. ##########################################################
  3762. ##########################################################
  3763. ##########################################################
  3764. ##########################################################
  3765. ##########################################################
  3766. ##########################################################
  3767. ##########################################################
  3768. ##########################################################
  3769. ##########################################################
  3770. ##########################################################
  3771. ##########################################################
  3772. ##########################################################
  3773. ##########################################################
  3774. ##########################################################
  3775. ##########################################################
  3776. ##########################################################
  3777. ##########################################################
  3778. ##########################################################
  3779. ##########################################################
  3780. ##########################################################
  3781. ##########################################################
  3782. ##########################################################
  3783. ##########################################################
  3784. ##########################################################
  3785. ##########################################################
  3786. ##########################################################
  3787. ##########################################################
  3788. ##########################################################
  3789. ##########################################################
  3790. ##########################################################
  3791. ##########################################################
  3792. ##########################################################
  3793. ##########################################################
  3794. ##########################################################
  3795. ##########################################################
  3796. ##########################################################
  3797. ##########################################################
  3798. ##########################################################
  3799. ##########################################################
  3800. ##########################################################
  3801. ##########################################################
  3802. ##########################################################
  3803. ##########################################################
  3804. ##########################################################
  3805. ##########################################################
  3806. ##########################################################
  3807. ##########################################################
  3808. ##########################################################
  3809. ##########################################################
  3810. ##########################################################
  3811. ##########################################################
  3812. ##########################################################
  3813. ##########################################################
  3814. ##########################################################
  3815. ##########################################################
  3816. ##########################################################
  3817. ##########################################################
  3818. ##########################################################
  3819. ##########################################################
  3820. ##########################################################
  3821. ##########################################################
  3822. ##########################################################
  3823. ##########################################################
  3824. ##########################################################
  3825. ##########################################################
  3826. ##########################################################
  3827. ##########################################################
  3828. ##########################################################
  3829. ##########################################################
  3830. ##########################################################
  3831. ##########################################################
  3832. ##########################################################
  3833. ##########################################################
  3834. ##########################################################
  3835. ##########################################################
  3836. ##########################################################
  3837. ##########################################################
  3838. ##########################################################
  3839. ##########################################################
  3840. ##########################################################
  3841. ##########################################################
  3842. ##########################################################
  3843. ##########################################################
  3844. ##########################################################
  3845. ##########################################################
  3846. ##########################################################
  3847. ##########################################################
  3848. ##########################################################
  3849. ##########################################################
  3850. ##########################################################
  3851. ##########################################################
  3852. A view is one of two primary types of metadata (the other is a ?
  3853. ). Each database contains one or more views, which describe one representation of some or all of the documents in a database. A view consists of various attributes and one or more 
  3854. columns?
  3855. . In addition, each view defines an index. A view's index is a hierarchical, sorted collection of documents. A view also contains data, in the form of a table of 
  3856. cells?
  3857. . Lotus Notes represents views as simply data, and the standard Lotus Notes API supplies no abstraction of this data. The HiTest view abstraction supports easy access to view metadata. The primary attributes of a view are a name and ID. HiTest uses the constant NULLID to represent an invalid view ID.?
  3858. The following flags define view attributes in the HTVIEW structure:?
  3859. HTVIEW_COLLAPSED            Open view collapsed (default is expanded)
  3860. HTVIEW_NO_HIERARCHY        View is flat (no responses)
  3861. HTVIEW_DISP_ALL_UNREAD        Display unread markers in margin for all documents
  3862. HTVIEW_DISP_CONFLICT        Display replication conflicts?
  3863. HTVIEW_DISP_MAIN_UNREAD    Display unread markers in margin only for main documents
  3864. HTVIEW_USES_TOTALS        One or more columns are totaled?
  3865. htViewList returns the following view summary structure:
  3866. typedef struct
  3867.   HTVIEWID viewid;            /* View ID */
  3868.   HTBOOL hidden;                /* Whether view is hidden in UI */
  3869.   char name [HTLEN_DESIGNNAME + 1];            /* View name */?
  3870.   char display_name1 [HTLEN_DISPLAYNAME + 1];    /* Primary display
  3871.                                    name */
  3872.   char display_name2 [HTLEN_DISPLAYNAME + 1];    /* Secondary display
  3873.                                    name */
  3874. } HTVIEWSUMM;                /* htViewList summary structure */?
  3875. htViewGetAttrib returns the following view attribute structure:?
  3876. typedef struct
  3877.   HTFLAGS flags;                /* View flags (HTVIEW_xxx) */?
  3878.   WORD background_color;        /* Background color */
  3879.   HTFONT title_border_font;        /* Font for title and borders */?
  3880.   HTFONT unread_font;            /* Font for unread rows */
  3881.   HTFONT totals_font;            /* Font for totals and statistics */
  3882.   WORD update_interval;            /* Seconds between automatic updates
  3883.                            Use zero for no auto update */?
  3884.   HTBOOL hidden;                /* Whether view is hidden in UI */
  3885.   char name [HTLEN_DESIGNNAME + 1];            /* View name */?
  3886.   char display_name1 [HTLEN_DISPLAYNAME + 1];    /* Primary display
  3887.                                    name */
  3888.   char display_name2 [HTLEN_DISPLAYNAME + 1];    /* Secondary display
  3889.                                    name */
  3890. } HTVIEW;                         /* View attribute structure */?
  3891. The three name fields in the HTVIEW and HTVIEWSUMM structures handle Notes multiple naming of objects. Views may have multiple names, and the first name may consists of two parts. The 
  3892.  field contains the string which Notes uses internally to refer to a given view. The ?
  3893. display_name1?
  3894.  field contains the name which appears in the Notes UI. For a cascading view name, the ?
  3895. display_name2?
  3896.  field contains the cascading component of the Notes UI name. When a view has only one name, the ?
  3897.  field is equal to either 
  3898. display_name1?
  3899.  (if not cascading) or ?
  3900. display_name1?
  3901. display_name2?
  3902.  (if cascading). The hidden field indicates whether Notes normally displays the view in the Notes UI View menu. A hidden view has its the display name enclosed in parenthesis.?
  3903. The view group contains the following functions:
  3904. htViewCopy        Copies a view from one cursor to another
  3905. htViewDelete        Deletes a view from a database
  3906. htViewGetAttrib        Obtains the attributes of a view?
  3907. htViewGetId        Obtains a view ID from the view name?
  3908. htViewList        Iterates through views in a database
  3909. htViewSet        Assigns the active view for a cursor?
  3910. cursor
  3911.     The cursor containing the view.
  3912.     viewname?
  3913.     The view name for which to obtain the ID.
  3914. HTVIEWID htViewGetId (HTCURSOR cursor, char *viewname);?
  3915.     HTCURSOR    cursor;         /* Input */?
  3916.     char        *viewname;         /* Input */?
  3917. cursor
  3918.     The cursor from which to list views.?
  3919.     operation
  3920.     An element of the HTLIST enumeration that indicates whether and how to reset the view list. Use HTLIST_REFRESH to discard the view list and obtain a new list from Notes. Use HTLIST_FIRST to set the next element in the list to the first element. Use HTLIST_NEXT to obtain the element following the previously fetched element. The first call to this function after opening the cursor always uses the value HTLIST_REFRESH.
  3921.     htviewsumm?
  3922.     The structure to receive the views summary information. See the View object section preceding the htView functions for a description of this structure and its contents.?
  3923. HTSTATUS htViewList (cursor, operation, viewsumm);
  3924.     HTCURSOR    cursor;         /* Input */?
  3925.     HTLIST    operation;         /* Input */
  3926.     HTVIEWSUMM    *viewsumm;         /* Output */?
  3927. Description of the Comprec object
  3928. Obtains the number of composite records in a composite.
  3929. Deletes one or more consecutive composite records from a composite.
  3930. Retrieves the data from a composite record.
  3931. Retrieves the values and a data pointer from a composite record.
  3932. tghOl
  3933. Inserts a single composite record into an existing composite.
  3934. F9R)"
  3935. Obtains the length of the variable length portion of a composite record.
  3936. Iterates through composite records in a composite.
  3937. Modifies the contents of a single composite record.
  3938. Description of the Composite object
  3939. Creates a new composite whose contents are a copy of another composite.
  3940. Creates a new composite whose contents are a partial copy of another composite.
  3941. Creates a new, empty composite within a document.
  3942. Exports a composite to a file in a selected format.
  3943. Iterates through available composite export formats.
  3944. Obtains a piece of information from and about an open composite.
  3945. Obtains operating system-specific font information from a Notes font.
  3946. Imports and converts a file into a new composite.
  3947. Iterates through available composite import formats.
  3948. Iterates through text in a composite.
  3949. Merges the contents of one composite into another composite.
  3950. Generates a Notes font from operating system-specific font information.
  3951. Obtains a piece of information from and about a cursor.
  3952. Assigns the value of a cursor option.
  3953. Description of the Database object
  3954. Obtains a database filename from a database title.
  3955. Iterates through available Notes databases and directories on a given server.
  3956. Iterates through databases in a database catalog.
  3957. Description of the Formula object
  3958. Concatenates a string to the formula buffer.
  3959. Concatenates a printf-style formatted string to the formula buffer.
  3960. Copies a portion of the current formula buffer.
  3961. Executes the formula buffer and produces an index.
  3962. Returns the length of the current formula buffer.
  3963. Obtains the number of documents in an index.
  3964. Obtains a piece of information about the active index.
  3965. Obtains the current position in the index.
  3966. Obtains the current hierarchical position in a view-based index.
  3967. Navigates through the documents in an index.
  3968. ,Fl=}
  3969. Assigns the current position in the index.
  3970. Assigns the current hierarchical position in a view-based index.
  3971. Binds an item name to a program variable.
  3972. Obtains the number of items in a document.
  3973. Converts and retrieves the data for an item into a supplied buffer.
  3974. Obtains a piece of information about a document item.
  3975. Returns a pointer to an items data converted to a specified type.
  3976. Obtains the length of an item as converted to a specified data type.
  3977. Iterates through items in a document.
  3978. Writes an item to a document, overwriting any existing item of the same name.
  3979. Removes the binding of an item name.
  3980. Deletes a file attachment from a document.
  3981. Extracts a file attachment from a document to a file.
  3982. Iterates through file attachments in a document.
  3983. Glossary
  3984. Chapter 1.  Overview of HiTest
  3985. Chapter 2.  Installing HiTest
  3986. Chapter 3.  Programming to the HiTest API
  3987. Chapter 4.  HiTest Functions
  3988. Object (Global)
  3989. Object Addin
  3990. Object Cell
  3991. Object Column
  3992. Object Composite
  3993. Object Comprec
  3994. Object Cursor
  3995. Object Database
  3996. Object Datetime
  3997. Object Document
  3998. Object Error
  3999. Object Field
  4000. Object File
  4001. Object Font
  4002. Object Form
  4003. Object Formula
  4004. Object Index
  4005. Object Item
  4006. Object Macro
  4007. Object Mail
  4008. Object Server
  4009. Object TextList
  4010. Object View
  4011. Copies a form from one cursor to another.
  4012. Obtains the attributes of a form.
  4013. Obtains a form ID from the form name.
  4014. Iterates through forms in a database.
  4015. Assigns the active form for a cursor.
  4016. Creates a virtual form from the next inserted documents bindings.
  4017. Copies a macro from one cursor to another.
  4018. ihA[*
  4019. Obtains a macro ID from the macro name.
  4020. Iterates through macros in a database.
  4021. Description of the TextList object
  4022. Returns the number of text elements in a text list.
  4023. Copies a text list element into a supplied buffer.
  4024. Returns a pointer to a text list element.
  4025. Returns the length of either one text list element, or the entire text list.
  4026. Copies a view from one cursor to another.
  4027. Obtains the attributes of a view.
  4028. Obtains a view ID from the view name.
  4029. Iterates through views in a database.
  4030. Remotely executes a Notes server console command.
  4031. Obtains a piece of information from and about a server.
  4032. Iterates through available Notes servers.
  4033. Chapter 3.  Programming to the HiTest API
  4034. Chapter 3.  Programming to the HiTest API
  4035. Chapter 3.  Programming to the HiTest API
  4036. Chapter 3.  Programming to the HiTest API
  4037. Chapter 3.  Programming to the HiTest API
  4038. Chapter 3.  Programming to the HiTest API
  4039. Section
  4040. Chapter 
  4041. Chapter
  4042. MainSection
  4043. Chapter
  4044. Object 
  4045. Object"
  4046. Section
  4047. Section
  4048. MainSection
  4049. Chapter
  4050. Object
  4051. Description
  4052. Object
  4053. Description of the 
  4054. Object"
  4055.  object
  4056. Summary
  4057. $1Subject$0$2$Conflict$REF$C1$
  4058. Glossary
  4059. Chapter 1.  Overview of HiTest
  4060. 1.1  General
  4061. 1.2  Benefits
  4062. 1.3  Basic Structure
  4063. Chapter 2.  Installing HiTest
  4064. 2.1  Installation
  4065. 2.2  Samples
  4066. 3.1  Requirements
  4067. 3.2  Program Flow
  4068. 3.3  Data Types
  4069. 3.4  Context
  4070. 3.5  Error Handling
  4071. 3.6  Mixing HiTest with 
  4072. Chapter 4.  HiTest Functions
  4073. 4.1  Overview
  4074. Object (Global)
  4075. Description
  4076. Object Addin!
  4077. Description of the Addin object
  4078. htConvert
  4079. htConvertLength
  4080. htGetEnvString
  4081. htGetInfo
  4082. htInit
  4083. Initializes the HiTest API.
  4084. htSetEnvString
  4085. Object Cell 
  4086. Description of the Cell object
  4087. Object Column"
  4088. Description of the Column object
  4089. Object Composite
  4090. htSetOption
  4091. htTerm
  4092. Terminates the HiTest API.
  4093. htAddinGetInterval
  4094. htAddinPutMsg
  4095. htAddinSetInterval
  4096. Sets a scheduling interval.
  4097. htAddinSetStatus
  4098. htAddinYield
  4099. htCellBind
  4100. htCellFetch
  4101. htCellLength
  4102. htCellUnbind
  4103. htColumnCount
  4104. htColumnList
  4105. Object Comprec
  4106. htCompCopy
  4107. htCompCopySubset
  4108. htCompCreate
  4109. htCompExport
  4110. Object Cursor"
  4111. Description of the Cursor object
  4112. Object Database
  4113. htCompExportList
  4114. htCompGetInfo
  4115. htCompGetOSFont
  4116. htCompImport
  4117. htCompImportList
  4118. htCompListText
  4119. htCompMerge
  4120. htCompPutOSFont
  4121. htComprecCount
  4122. htComprecDelete
  4123. htComprecFetch
  4124. htComprecGetPtr
  4125. htComprecInsert
  4126. htComprecLength
  4127. htComprecList
  4128. htComprecUpdate
  4129. htCurClose
  4130. Closes an open cursor.
  4131. Object Datetime
  4132. Object Document
  4133. Object Error!
  4134. Description of the Error object
  4135. Object Field!
  4136. Description of the Field object
  4137. htCurGetInfo
  4138. htCurOpen
  4139. Opens a HiTest cursor.
  4140. htCurReset
  4141. Resets the state of a cursor.
  4142. htCurSetOption
  4143. htDbGetPath
  4144. htDbList
  4145. htDbListCat
  4146. htDatetimeCompare
  4147. htDatetimeCreate
  4148. htDatetimeDiff
  4149. htDatetimeGetInfo
  4150. htDatetimeUpdate
  4151. htDocClose
  4152. htDocCopy
  4153. htDocCreate 
  4154. Creates a new, empty document.
  4155. htDocDelete
  4156. htDocFetch
  4157. htDocGetInfo
  4158. Object File 
  4159. Description of the File object
  4160. Object Font 
  4161. Description of the Font object
  4162. Object Form 
  4163. Description of the Form object
  4164. htDocOpen
  4165. htDocPut
  4166. htDocUpdate
  4167. htErrorFetch
  4168. htErrorSetBuffer
  4169. htErrorSetProc
  4170. htFieldCount
  4171. htFieldGetInfo
  4172. htFieldList
  4173. htFileDelete
  4174. htFileFetch
  4175. htFileList
  4176. htFilePut 
  4177. Attaches a file to a document.
  4178. Object Formula
  4179. htFormCopy
  4180. htFormDelete!
  4181. Deletes a form from a database.
  4182. htFormGetAttrib
  4183. htFormGetId
  4184. htFormList
  4185. htFormSet
  4186. htFormTemplate
  4187. Object Index!
  4188. Description of the Index object
  4189. htFormulaConcat
  4190. htFormulaConcatf
  4191. htFormulaCopy
  4192. htFormulaExec
  4193. htFormulaLength
  4194. htFormulaReset
  4195. Clears the formula buffer.
  4196. Object Item 
  4197. Description of the Item object
  4198. htIndexCount
  4199. htIndexGetInfo
  4200. htIndexGetPos
  4201. htIndexGetTreePos
  4202. htIndexNavigate
  4203. htIndexRefresh
  4204. Refreshes a view-based index.
  4205. htIndexSearch
  4206. Performs a full text search.
  4207. htIndexSetPos
  4208. htIndexSetTreePos
  4209. Object Macro!
  4210. Description of the Macro object
  4211. htItemBind
  4212. Object Mail 
  4213. Description of the Mail object
  4214. Object Server"
  4215. Description of the Server object
  4216. htItemCount
  4217. htItemDelete"
  4218. Deletes an item from a document.
  4219. htItemFetch
  4220. htItemGetInfo
  4221. htItemGetPtr
  4222. htItemLength
  4223. htItemList
  4224. htItemPut
  4225. htItemUnbind
  4226. htMacroCopy
  4227. htMacroDelete"
  4228. Deletes a macro from a database.
  4229. htMacroExec
  4230. Executes a macro.
  4231. htMacroGetId
  4232. htMacroList
  4233. htMailSend
  4234. Sends a mail message.
  4235. Object TextList
  4236. Object View 
  4237. Description of the View object
  4238. htTextListCount
  4239. htServerExec
  4240. htServerGetInfo
  4241. htServerList
  4242. htTextListFetch
  4243. htTextListGetPtr
  4244. htTextListLength
  4245. htViewCopy
  4246. htViewDelete!
  4247. Deletes a view from a database.
  4248. htViewGetAttrib
  4249. htViewGetId
  4250. htViewList
  4251.     The view to delete.
  4252. ######################
  4253. HTSTATUS htViewDelete (cursor, viewid);?
  4254.     HTCURSOR    cursor;         /* Input */?
  4255.     HTVIEWID    viewid;         /* Input */?
  4256. cursor
  4257.     The cursor containing the view.
  4258.     viewid?
  4259.     Z    N    A    3    !    
  4260. Times New Roman
  4261. HiTest offers a consistent interface to the various components of Lotus Notes. The highest level of abstraction is the set of HiTest objects, covering the various components of Lotus Notes. The following diagram shows the object containment hierarchy:
  4262. Microsoft Word
  4263. Times New Roman
  4264. Times New Roman
  4265. Server8
  4266. Process
  4267. Addin
  4268. CursorH
  4269. DatabaseH
  4270. CellH
  4271. Index
  4272. ColumnH
  4273. ViewH
  4274. Mail^
  4275. Macro
  4276. ComprecordH
  4277. Composite
  4278. File=
  4279. Item'
  4280. Formula
  4281. Form=
  4282. Field
  4283. DocumentH
  4284. Error
  4285. TextlistC
  4286. DatetimeH
  4287. $$U$$
  4288. $IU$I
  4289. $mU$m
  4290. I$UI$
  4291. IIUII
  4292. ImUIm
  4293. m$Um$
  4294. mIUmI
  4295. mmUmm
  4296.     The d
  4297.  of the source d
  4298.     src_len
  4299. he length of the
  4300. data. A value of
  4301. rects HiTest to 
  4302. The object-based design of HiTest has two major usability benefits. First, abstraction of  objects that the standard API simply considers data (form, field, view, column, macro, cell, file, and composite) often lets single function calls replace medium-sized functions. Second, HiTest was designed as a consistent high-level Notes interface, rather than a collection of low-level internal functions. Common actions, such as iterating through an object, are done through common interfaces (e.g., most objects contain a List function, which works similarly across objects).
  4303. Times New Roman
  4304. Objects within the HiTest API are represented by either an identifier or a handle. Simple objects need only an identifier. An identifiers type depends on the object. For example, a servers identifier is a string, a documents identifier is an ID, and a view columns identifier is a number. Larger or more complex objects must be opened and closed and require a handle. Cursors, documents, and composite items use handles. Certain actions on objects are only valid within the context of other objects. The simplest example is that of an open document. Closing a cursor containing an open document closes the document and invalidates its handle.
  4305. A cursor represents a single HiTest session. Each process or task can contain multiple cursors at any point in time. Multiple cursors may be open to a single database. All actions performed against a database occur through a cursor. A cursor contains a state which consists of an active form, an active view, an index, bindings, and open documents. Any operation which cancels or replaces part of a cursors state destroys the previous value. For example, producing a new index destroys the previous index.e
  4306. The following table lists the HiTest functional contexts in a simplified state transition table. Each context lists objects and functions which are valid from within that context (an object name indicates that all functions of that object are valid in the context). The context ordering is from highest level to lowest. When entering a lower context from a higher context, all functions in the previous context are still valid . For example, after entering the h
  4307. Open Composite
  4308.  context from the 
  4309. Open DocumentS
  4310.  context, the htItemPut function is still valid even though it is not listed in the 
  4311. Open Composite
  4312. . Each context also lists those functions which cause a transition to a different context. When entering a lower context from a higher context, all transitions in the previous context are still valid. For example, performing htCurClose from the e
  4313. Open Document 
  4314.  context causes a return to the 
  4315. Initializedp
  4316.  context. Multiple contexts may exist simultaneously. For example, calling htDocCreate when in the 
  4317. Fetched Document
  4318.  context will create a valid 
  4319. Open Document
  4320.  context. These document contexts may operate independently, but a call to htCurClose would close them both by closing their parent context.
  4321. Context
  4322. Valid
  4323. Transitions
  4324. Uninitialized 
  4325. htInit (Initialized)
  4326. Initializede
  4327. Global, Addin, Server, Database, TextList, Datetime, Error
  4328. htCurOpen (Open Cursor)
  4329. htTerm (Uninitialized)
  4330. Open Cursor
  4331. Cursor, Form, View, Field, Column, Macro, Formula, Mail
  4332. htCurClose (Initialized)
  4333. htItemBind (Bound Item)
  4334. htFormulaExec (Active Index)
  4335. htDocOpen, htDocCreate (Open Document)
  4336. Bound Item
  4337. htDocPut
  4338. htCurReset (Open Cursor),
  4339. htFormulaExec (Active Index)
  4340. Active Index
  4341. Index, Cell*
  4342. htCurReset (Open Cursor)
  4343. htCellBind* (Active Index/Bound Cell)
  4344. htItemBind (Active Index/Bound Item)
  4345. Active Index / Bound Cell
  4346. htDocFetch
  4347. htCurReset (Open Cursor)
  4348. htIndexSearch, htFormulaExec (Active Index)
  4349. htItemBind (Active Index/Bound Item)
  4350. Active Index / Bound Item
  4351. htDocPut
  4352. htIndexSearch, htFormulaExec (Active Index)
  4353. htDocFetch (Fetched Document)
  4354. Open Document
  4355. Document, Item, File
  4356. htDocClose (Open Cursor),
  4357. htItemFetch/htItemGetPtr to type HTTYPE_COMPOSITEI
  4358.                 (Open Composite)
  4359. htCompImport, htCompCreate (Open Composite)
  4360. Fetched Document
  4361. Document, Item, File, htDocUpdate
  4362. htDocClose (Active Index/Bound Item)
  4363. htIndexNavigate, htIndexSetPos, htIndexSetTreePost
  4364.                 (Active Index/Bound Item)
  4365. htIndexSearch, htFormulaExec (Active Index)u
  4366. htItemFetch/htItemGetPtr to type HTTYPE_COMPOSITE 
  4367.                 (Open Composite)
  4368. htCompImport, htCompCreate (Open Composite)
  4369. Open Composite
  4370. Composite, ComprecordT
  4371. * Cell functions are only valid in view-based indices.
  4372. Context Transition Table
  4373. In HiTest, higher contexts contain lower contexts. The following diagram shows context containment.
  4374. Microsoft Word
  4375. Times New Roman
  4376. Times New Roman
  4377. Initialized
  4378. Times New Roman
  4379.  Cursor
  4380. BindC
  4381. Open Document
  4382.   Active Index
  4383.   Active Index/Bound Cell
  4384.  Active Index/Bound Item
  4385.  Fetched Document
  4386.   Open Composite
  4387. Uninitialized
  4388.   Open Composite
  4389. $$U$$
  4390. $IU$I
  4391. $mU$m
  4392. I$UI$
  4393. IIUII
  4394. ImUIm
  4395. m$Um$
  4396. mIUmI
  4397. mmUmm
  4398. r 1.  Overview o
  4399. 1.2  Benefits
  4400.         Context Containment Diagramo
  4401. Program context affects the method of data access. Often data is accessible with either a Fetch operation or a GetPtr operation. The Fetch operation transfers data to a buffer supplied by the calling program. When the data source becomes invalid (e.g., by closing the document), this data is still valid since it is a copy into memory managed by the calling program. The GetPtr operation simply returns a pointer to memory managed by HiTest. The GetPtr operation is more efficient than the Fetch operation when retrieving the same data value repeatedly. When the data source becomes invalid in this case, the data pointer becomes invalid. The calling program can no longer access the data, and should not free the data pointer itself since HiTest manages the memory.
  4402. Times New Roman
  4403. A basic HiTest API program involves reading and writing Notes data. The flowcharts on the following pages show basic program flow including opening a cursor, producing an index (result set), reading and writing data, and closing the connection.
  4404. Microsoft Word
  4405. Times New Roman
  4406. "Arial
  4407. htInit%
  4408. More8
  4409. options
  4410. set?"
  4411. htSetOption
  4412. htCurOpen
  4413. Strict-
  4414. Binding?-
  4415. htFormSet
  4416. Produce
  4417. view-based"
  4418. result
  4419. set?"
  4420. htViewSet
  4421. htFormulaConcat
  4422. htFormulaExec
  4423. Using
  4424. Binding?-
  4425. Goto4
  4426. Chart
  4427. Goto4
  4428. Chart
  4429. "Arial
  4430. "Arial
  4431. Establishing a connection (cursor) and producing a result set (index)
  4432. "Arial
  4433. "Arial
  4434. "Arial
  4435. Edge Research is happy to announce that we've posted for7
  4436. downloading version 1.0 of Notesworthy Controls, our set of Visual.
  4437. Basic custom controls (VBXs) for Lotus Notes.  You can find them in
  4438. the Lotus Communications+ Forum (Notes 3rd Party section) on
  4439. CompuServe, on Ziffnet and in the Edge "Notesworthy Tools
  4440. Distribution" db on WorldCom.  We plan to have a copy available
  4441. through FTP from WorldCom shortly.  This is the full production
  4442. release, including complete documentation, context-sensitive online
  4443. help and versions of our HiTest API and htGLUE.
  4444. We believe this is a rich set of eleven drag and drop visual controls.N
  4445. Each control is like a "piece" of the standard Notes UI, but since they
  4446. are separate pieces you can mix and match them and other VB
  4447. controls to make your own tailored Notes interfaces.  What's more,*
  4448. Times New Roman
  4449. using our Piped Properties technology, you can build whole.
  4450. applications without writing any Visual Basic code.  You can get even
  4451. more functionality by using our htGLUE interoperability layer that lets
  4452. you call HiTest from VB.*
  4453. HiTest, our enhanced C language API for Lotus Notes, is the core<
  4454. product upon which Notesworthy Controls and htGLUE are built.  It has
  4455. error handling, an object model and support for Microsoft, IBM and.
  4456. Borland compilers. There are both Windows and OS/2 versions,7
  4457. though only the former is packaged with the VBXs.  API programs
  4458. performing complex tasks such as composite inport or macro.
  4459. execution take 15 or 20 .
  4460. pages
  4461.  using the Lotus V3 API but only 15 or
  4462. lines
  4463.  using HiTest, and the code flows much more smoothly.   A
  4464. runtime version of HiTest is in the posted package.  The current
  4465. versions are HiTest 0.90 (beta) and htGLUE 0.80 (beta).  When we*
  4466. ship these two products in June, we will synchronize all three products
  4467. with a point release of the VBXs.
  4468. The first three copies at any one company are free, but if you want to3
  4469. deploy to more desktops you will need a paid license from us.
  4470. Introductory pricing, until August 31, is $1995 for 100 seats.  We're
  4471. taking a different approach to software distribution since we physically
  4472. ship no disks and effectively give you the ultimate money back*
  4473. guarantee: try it, and if it doesnt meet your requirements you've lost.
  4474. nothing.  We will do our best to hold our users and ourselves to the.
  4475. terms of our software licenses.
  4476. We conduct our electronic enterprise primarily on the WorldCom NotesN
  4477. servers.  Our distribution db there has a Product Warehouse view from
  4478. which you can detach products, a Release Notes view, a Sample
  4479. Applications view, a Discussion view and of course a Support bug7
  4480. report/response view.  We intend to respond to postings there within
  4481. one business day, and it is a rich source of information about these.
  4482. products already.  This is where we expect our users to look for.
  4483. technical support. We also maintain a mirror db for beta testers of our
  4484. unreleased products on WorldCom..
  4485. $$U$$
  4486. $IU$I
  4487. $mU$m
  4488. I$UI$
  4489. IIUII
  4490. ImUIm
  4491. m$Um$
  4492. mIUmI
  4493. mmUmm
  4494. Microsoft Word
  4495. Times New Roman
  4496. "Arial
  4497. Chart
  4498. (Data
  4499. access%
  4500. with0
  4501. binding)%
  4502. More8
  4503. Items
  4504. Bind?
  4505. htItemBind%
  4506. More8
  4507. Cells
  4508. Bind?
  4509. htCellBind%
  4510. htIndexNavigate
  4511. successful?
  4512. htDocFetch%
  4513. Updating0
  4514. back?
  4515. Modify8
  4516. data%
  4517. bound
  4518. items
  4519. htDocUpdate
  4520. htCurClose%
  4521. htTerm%
  4522. "Arial
  4523. Times New Roman
  4524. Accessing and modifying data in an index using data binding
  4525. $$U$$
  4526. $IU$I
  4527. $mU$m
  4528. I$UI$
  4529. IIUII
  4530. ImUIm
  4531. m$Um$
  4532. mIUmI
  4533. mmUmm
  4534. 3.  Prog
  4535. to the HiTest AP
  4536. Microsoft Word
  4537. Times New Roman
  4538. "Arial
  4539. Chart
  4540. (Manual
  4541. data%
  4542. access)
  4543. htIndexNavigate
  4544. successful?
  4545. More8
  4546. Cells
  4547. Fetch?)
  4548. htCellFetch
  4549. Access-
  4550. modify8
  4551. document%
  4552. data?
  4553. htDocOpen
  4554. More8
  4555. Items
  4556. read?
  4557. htItemFetch
  4558. htItemGetPtr%
  4559. More8
  4560. Items
  4561. write?0
  4562. htItemPut
  4563. htDocClose%
  4564. htCurClose%
  4565. htTerm%
  4566. "Arial
  4567. Times New Roman
  4568. Accessing and modifying data in an index using explicit functions
  4569. $$U$$
  4570. $IU$I
  4571. $mU$m
  4572. I$UI$
  4573. IIUII
  4574. ImUIm
  4575. m$Um$
  4576. mIUmI
  4577. mmUmm
  4578.