Lotus C API NSFDbOpen is failing when Lotus Notes is not connected to Domino

I am writing an application which will read the documents of LotusTraveler.nsf database present on domino server. To do so I am using Lotus C API. Following is the code that will help me with it:

error = NotesInitExtended(1, &(char *)szNotesExeDir);

if (NOERROR == error)

{

/* switch the environment to admin*/

error = SECKFMSwitchToIDFile(szDbNameID, szPassword, szUsername,

	sizeof(szUsername), fKFM_switchid_DontSetEnvVar, NULL);



if (NOERROR == error)

{

	char *server_name = "fluid360.com";

	char *db_name = "LotusTraveler.nsf";

	char *path_name = db_name;



	if (error = OSPathNetConstruct( NULL, server_name, db_name, path_name))

	{

		return (ERR(error));

	}



	/* Open the database. */



	if (error = NSFDbOpen (path_name, &db_handle))

		return (ERR(error));

		

}

}

When I executed this code with the Notes connected to Domino everything is working fine. However when the Notes is not running or not connected to Domino(still internet connectivity is available), the session is created and the switch to id file is successful. However the opening of Database is failing.

The Lotus Notes is of version Release 8.5.2 and the OS we tried to execute our application is Windows 7.

According to Lotus C API, only the existence of Lotus Notes/Domino installation is required on the machine on which the application process executes. It does not mandate the Notes to be connected to Domino. What is the work around for this to be working?

Subject: Check User security settings