Unread List Problem - C++ API

I am trying to implement the “read/unread mail” feature into our own email client to Dominomail db. We are trying to accomplish this via the C API.

It seems to me that the Unread list (in database) is not being

updated after I delete the noteID (from the Unread list). Below is

the code snippet that shows what I do to delete a given noteID in a

given database for a particular user. I do check for return value for

all notes call and there seems to be no error in any of them. I am

using C-API tool kit 6.0.2 with R6 domino server (6.0.2) running under

linux (redhat 8.0 kernel 2.4.18). Any help on this matter is greatly

appreciated.

Thanks.

ps: to keep matters simple let us assume that notes client never accesses

the emails.

For a given noteid, user, and mail database


// get unread list from db

status = NSFDbGetUnreadNoteTable (hDb, pName, nameLen,

                              TRUE,         //Create list if not there

                              &hWCpy);

// Bring table up to date

status = NSFDbUpdateUnread (hDb, hWCpy);

//make a base version (hOCpy) from the working copy (hOCpy)

status = IDTableCopy (hWCpy, &hOCpy);

//Here on we work with a working copy

if ( IDIsPresent(hWCpy, noteID) ){

// mark as read - remove from unread table

IDDelete (hWCpy, noteID, (NOTESBOOL NOTESPTR) NULL);

printf("***Marked as READ %lX\n", noteID);

}else{

// mark as read - add to unread table

IDInsert (hWCpy, noteID, NULL);

printf("***Marked as UNREAD %lX\n", noteID);

}

// Merge changes and Persist it to database

status = NSFDbSetUnreadNoteTable (hDb, pName, nameLen,

                              TRUE,      // Force the write to disk

                              hOCpy, hWCpy);

//CleanUp

....

IDDestroyTable(hWCpy);

hWCpy = NULLHANDLE;

....

    IDDestroyTable(hOCpy);

hOCpy = NULLHANDLE;

Subject: Unread List Problem - C++ API

Hi Joseph,

I’m trying to de the same thing as you did in your sample but i’m dummy in C++ so could you post the entire declaration of your functions ?

Thanks,

Julien