LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 6<br />
Accessing Notes Sessions<br />
Notes sessions provide access to environment variables and address books,<br />
and they provide in<strong>for</strong>mation on the current user, Notes plat<strong>for</strong>m and<br />
Notes release number.<br />
In this chapter, we will discuss how to access Notes sessions:<br />
In HiTest<br />
Using Notes classes through OLE automation in <strong>Visual</strong> <strong>Basic</strong><br />
Using <strong>LotusScript</strong> in Notes.<br />
Accessing Notes Sessions Using the HiTest <strong>Basic</strong> API<br />
Session class functions are global within a HiTest API session (one<br />
processor task). These functions have no context beneath the implicit<br />
session context — that is, no functions in other classes affect their<br />
operation — and they are always usable, after calling HTInit.<br />
Every HiTest API program must initialize and terminate the HiTest API.<br />
Unless you call the HiTest API initialization function HTInit to establish a<br />
session, all other functions will fail. Additionally, every HiTest API<br />
program must call the HTTerm function after all HiTest API function calls<br />
are complete and be<strong>for</strong>e the program terminates. It is crucial to call the<br />
termination function to avoid leaving the system in a dangerous state.<br />
The single exception to these restrictions is the HTGetAPILibraryVersion<br />
function, which may be used be<strong>for</strong>e initialization to check the HiTest<br />
API DLL version code and string. The version of the HiTest API with<br />
which a program was created can be obtained with the constants<br />
HTVERSION_LIBRARY <strong>for</strong> the version code and<br />
HTVERSION_LIBRARY_STRING <strong>for</strong> the version string.<br />
For detailed in<strong>for</strong>mation on the Notes session functions, refer to the online<br />
help in<strong>for</strong>mation <strong>for</strong> the HiTest Tools <strong>Visual</strong> <strong>Basic</strong> API.<br />
Let’s look at some of the functions.<br />
113