C++ API: Session.Init thows 0x1007 (no message available)

Dear list,

Newbie question:

I try to initialize a session via Session.Init() and it throws the expecption 0x1007 (no message is available) if I execute my programm on a Lotus Notes installation machine. The connection to the server is up and working.

If I execute the same program on a Lotus Domino Server installation machine the initialization works fine and the whole programm executes as expected (just doing some calender entries).

Is the C++ API only working on the server machine?

Thanks in advance

Markus

Subject: C++ API: Session.Init thows 0x1007 (no message available)

Hi Markus,

Even I am struggling with same issue (Session.Init() and it throws the expecption 0x1007 (no message is available) from couple of days, can you please let me know, what needs to be taken care.

Also let me know what settings also need to be taken care of.

I had the Lotus client installed and I am using the Lotus C++ API;

One more thing is that, I have developed a COM component, so it does not register unless all the dependencies for lcppn30.dll are in the same folder.

Your inputs and help will be highly appreciated

Thanks a lot

Kamlesh

Subject: C++ API: Session.Init thows 0x1007 (no message available)

Are you launching the C API .exe from the Notes Program directory? You should.

It doesn’t matter where the .exe is located, but when you launch it, the current directory has to be the Notes Program directory (yes, you can also include the Notes Program directory to the system path, but I wouldn’t recommend to do so).

Subject: RE: C++ API: Session.Init thows 0x1007 (no message available)

If the EXE loads, then this is not the problem.

Btw, this is a major pain with Notes - our application had to add Notes to the PATH to resolve the DLL dependencies. Maybe someone knows a better way?

Thx

dB.

Subject: RE: C++ API: Session.Init thows 0x1007 (no message available)

Yes, don’t add the path of the Notes Program directory to your system environment (nor user environment).

From DOS, you can launch any C API by changing to the Notes Program Directory first (assuming that c:\notes is your Notes Program Directory in these examples):

c:

cd \notes

e:\yourdirectory\yournotescapi.exe

and if you launch it from the Windows UI, make a Shortcut of the exe and put “c:\notes” in in the “Start In:” field.

Subject: RE: C++ API: Session.Init thows 0x1007 (no message available)

Hi all,

thanks a lot, now it works,

seems that I missed some hint in the C++ API documentation.

Markus

Subject: RE: C++ API: Session.Init thows 0x1007 (no message available)

This doesn’t work for some types of applications.

For example, we have an Internet Explorer browser plugin that is loaded by IE and does something with Notes. The DLL will fail to load unless Notes is in the path and we don’t control Internet Explorer regarding where it starts from.

Thx

dB.

Subject: RE: C++ API: Session.Init thows 0x1007 (no message available)

Maybe it would work, if the C API would set it’s own current directory to the Notes Program directory, before it calls NotesInit().

Subject: RE: C++ API: Session.Init thows 0x1007 (no message available)

You would have to use a delay-loaded DLL in that case for Notes. Pain and suffering.