How to access the nsf in the c api

i want to write a dsapi use c language,but i don’t know how to access the nsf in the c api,

pls give me some helps!

thanx a lot!

Subject: how to access the nsf in the c api

From the C++ API 2.4 Guide (shipped with the C++ API):

Getting a database

The LNNotesSession::GetDatabase member function gets an existing database. The prototype for this function is

LNSTATUS GetDatabase( const LNString &pathname,

                  LNDatabase *db, const LNString &server = "" )

pathname is the database pathname (for example, myproj\sampledb). The pathname is relative to the Notes data directory. You can omit the .NSF file extension because it is the default extension.

db is a pointer to an LNDatabase object. If successful, the function associates the database you specified with the LNDatabase object. GetDatabase also accepts an optional third argument, server, a reference to an LNString specifying the server.

Example

The following example initiates a Notes session and retrieves an existing database:

LNNotesSession session; // Create LNNotesSession object

LNDatabase db; // Create LNDatabase object

LNSetThrowAllErrors(TRUE);

try

{

session.Init();

session.GetDatabase(“\project\mydb.nsf”, &db, “server1”);

}

catch(LNSTATUS error)

{

char errorBuf[LN_ERROR_MESSAGE_LENGTH];

LNGetErrorMessage(error, errorBuf);

cout << "Error: " << errorBuf << endl;

}

Subject: Downloading the C API reference guides should help (WAS: how to access the nsf in the c api)