hi, I am using notesapi (CAPI) to do a plug-in program for my Notes Client. I am using NSFNoteGetInfo call to get the current notes DBHANLDE. After that, I use this DBHANDLE in NSFDbInfoGet in order to get the database information. This code make my Notes Client crash sometime. A red box come out and stated is NULL Handle error.
May I know the proper way to check whether the DBHANDLE that I retrieve from NSFNoteGetInfo is a valid one? I already check NULL value after the function call. But crashing still happen sometime.
Verify the NOTEHANDLE value passed to NSFNoteGetInfo() is not NULLHANDLE.
If you are using the NSFNoteGetInfo() and NSFDbInfoGet() functions in a thread, use the NSFDbReopen() function on the DBHANDLE. Do not forget to use the NSFDbClose() function when done with the DBHANDLE.
Just to be extra cautious, use the NSFDbReopen() function even if you are not in a thread (and do not forget the NSFDbClose() function).