Password prompt

Hi there,

I am currently working on a project that retrieves documents from the Lotus Domino database using the Notes C++ API.

My program works perfectly fine. However, everytime when i try to use load anything data from the database, i will be prompt to enter my password

Is there anyway to work around this problem?

I was told to use the C API SECKFMSwitchToIDFile function. however, it does not seems to work. Below is how i use the function.

char *CharMailPath = InitInfo.CStrPath.GetBuffer(InitInfo.CStrPath.GetLength());

char *pUserName;

pUserName = new char;

SECKFMSwitchToIDFile(“\user.id”,“password”,pUserName,MaxPasswordLength,0,NULL);

Can anyone point out my error? I really need this urgently. Thanks a million for any help or advice in advance.

Subject: Password prompt

almost all c-api functions have return values called STATUS. so change your call to

STATUS ret_val=SECKFMSwitchToIDFile

this way you’ll get what went wrong. use OSLoadString to get error string.

i guess the problem is “\user.id”. try either “user.id” or use OSGetDataDirectory and append \user.id".

Markus Seitz

markus.seitz@icodex.com

Subject: RE: Password prompt

Thanks Markus. You are right. the problem lies with the “\user.id”. I put the full path into the function and it works fine now. Thanks for your response. Really appreciate it. :slight_smile: