Da kannst du Recht haben.
Dann musst du halt den harten Weg gehen, und die Lotusscript Funktionen nachbilden.
Hier ien Codefragment aus einem meiner Addins
/* Get the note id of the view we want. */
if (error = NIFFindView (dbhNames, "($VIMGroups)", &view_id))
{
NSFDbClose (dbhNames);
AddInLogMessageText("View not found: ($VIMGroups)...", ERR(error));
return (ERR(error));
}
/* Get a collection of notes using this view. */
if (error = NIFOpenCollection(
dbhNames, /* handle of db with view */
dbhNames, /* handle of db with data */
view_id, /* note id of the view */
0, /* collection open flags */
NULLHANDLE, /* handle to unread ID list (input and return) */
&coll_handle, /* collection handle (return) */
NULLHANDLE, /* handle to open view note (return) */
NULL, /* universal note id of view (return) */
NULLHANDLE, /* handle to collapsed list (return) */
NULLHANDLE)) /* handle to selected list (return) */
{
NSFDbClose (dbhNames);
return (ERR(error));
}
/* Look for notes that have the given primary sort key (which must be of
type text). We get back a COLECTIONPOSITION structure describing where the
first such note is in the collection, and a count of how many such notes
there are. Check the return code for "not found" versus a real error. */
error = NIFFindByName (
coll_handle, /* collection to look in */
szGrpName, /* string to match on */
FIND_CASE_INSENSITIVE, /* match rules */
&coll_pos, /* where match begins (return) */
&match_size); /* how many match (return) */
if (ERR(error) == ERR_NOT_FOUND)
{
NIFCloseCollection (coll_handle);
/* The group is not in the Domino Directory. Create a new one */
Du kannst uch ohne die Views suchen . Hier ein Beispiel mit der CPP API
/* first argument represents the configuration database;
Let's try to open the db */
LNString DatabasePathCatchAllDB;
DatabasePathCatchAllDB = argv[1];
s.GetDatabase( DatabasePathCatchAllDB, &workDB, s.GetUserName());
workDB.Open();
/* Find setup document*/
LNSearchOptions o;
o.SetNoteType (LNNOTETYPE_DOCUMENT);
o.SetBeginDate ("01/01/2005");
o.SetEndDate (s.GetCurrentDatetime());
workDB.Search ("Form=\"Setup\"", &col, &o);
LNDocument setupDoc = col[0];
setupDoc.Open();
LNText mboxes; /* get name of mailboxes, if multiple */
if (setupDoc.HasItem ("mailboxes"))
{ /* does item exist ? */
setupDoc.GetItem("mailboxes", &mboxes);
}