Creating Notes objects in Visual C++ .NET 2005 - Domino.NotesDatabase

I'm wanting to connect through to Lotus Notes using the Interop Dlls that are installed with Lotus Notes. Is it possible? I can do it in VB .NET code perfectly fine using NotesSession and Database (opening with replica ID). In C++ .NET I can create a NotesSession and connect to Lotus Notes using...

Domino::NotesSession ^ hello = gcnew Domino::NotesSession;
hello->Initialize("");

but whenever I use the NotesDatabase I get an error...

"Retrieving the COM class factory for component with CLSID {29131527-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 80040154."

I get this as an Exception when I do a try catch with this code:

Domino::NotesDatabase ^ goodbye = gcnew Domino::NotesDatabase;

This also happens with other Notes Objects such as NotesDBDirectory.

Thanks
nigelboyleAsked:
Who is Participating?
 
NetminderConnect With a Mentor Commented:
Closed, 500 points refunded.
Netminder
Site Admin
0
 
mshogrenCommented:
You say that it works fine in VB when you open the NotesDatabase by replica id.  So your declaration of the NotesDatabase object works there but not in C++?
0
 
nigelboyleAuthor Commented:
Yeah, the declaration is fine in VB and not in C++.
0
 
nigelboyleAuthor Commented:
Oops, I just discovered the problem. Turns out I don't need the New instance. Am I bad, sorry.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.