Function : Main Routines

NotesMain - Entry point for character mode API programs.
----------------------------------------------------------------------------------------------------------

#include <global.h>

STATUS LNPUBLIC NotesMain(
int argc,
char far *argv[]);

Description :

Simplified entry point for character mode API programs. You may structure your API program as a function named NotesMain(). This causes the Domino or Notes run time system to be initialized automatically before your NotesMain function gets control. After your NotesMain function returns, the Domino or Notes run time system is automatically terminated. Therefore, your NotesMain function does not need to initialize or terminate the Domino or Notes run time system explicitly.

If you structure your API program as a NotesMain function, you must link your program with the Domino or Notes bootstrap object file. Under Unix this object file is named notes0.o. Under Windows this file is named notes0.obj. The C API toolkit provides bootstrap object files for each platform in the LIB subdirectory appropriate to each platform.
Parameters :

Sample Usage :

STATUS LNPUBLIC NotesMain (int argc, char *argv[])
{
   STATUS  error;
   char   *szDBName;
   DBHANDLE  hDB;

   szDBName = argv[1];

   error = NSFDbOpen(szDBName, &hDB);
   NSFDbClose(hDB);

   return( ERR(error));
}


See Also :

AddInMain
----------------------------------------------------------------------------------------------------------