Can't create Lotus Notes objects

前端 未结 2 922
日久生厌
日久生厌 2021-01-24 08:11

I have IBM Notes 9 and Visual Studio 2010. I\'m trying to create a NOTESSESSION instance both of the following ways

http://www.ibm.com/developerworks/lotus/library/domin

相关标签:
2条回答
  • 2021-01-24 08:28

    We have a reference to Interop.Domino.dll and use the follow class to instantiate:

    Public NotInheritable Class LotusNotesSession
        Implements IEMailSession
    
        Private m_session As NotesSession
    
        Public Sub New(ByVal password As String)
            m_session = New NotesSession
            m_session.Initialize(password)
        End Sub
    End Class
    
    0 讨论(0)
  • 2021-01-24 08:34

    In the IBM.com article that you referenced, in Figure 1, notice that it lists "Lotus Notes Automation Classes" and "Lotus Domino Objects". It looks like you selected "Lotus Notes Automation Classes", but those are OLE classes and the reference was apparently generated as an interface. You want the second, the "Lotus Domino Objects", which are COM classes. Those can be instantiated in the way reflected in the documentation.

    If you don't see "Lotus Domino Objects" in the references dialog, you may have a registration issue, which can be solved with the command regsvr32 nlsxbe.dll (issued from the Notes program folder).

    You may need to be aware, however, of the fact that the Notes COM classes are not supported on Win64 (see the bottom of this IBM technote for confirmatiion of that.) If you didn't find them registered, that could be why. They do mostly work, but there are a few known issues - e.g., with NotesDatabase methods that return collections of design elements. If you need to be sure that you are only working with vendor-supported APIs, though, you're going to have to look at the other available approaches to working the Notes data.

    0 讨论(0)
提交回复
热议问题