本文介绍了无法创建Lotus Notes对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有IBM Notes 9和Visual Studio2010.我试图通过以下两种方式创建NOTESSESSION实例

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/domino-msnet/index.html http://www.codeproject.com/Articles/18517/Lotus-Notes-Integration-with-Microsoft-NET-Platfor

但出现错误'New'不能在接口上使用.在尝试了我能想到的所有排列之后,仍然没有运气.我需要做些什么来创建莲花对象?

but get the error 'New' cannot be used on an interface. After trying every permutation I can think of, still no luck. What do I need to do differently to create lotus objects?

Dim notesSession As New lotus.NOTESSESSION

参考 Lotus Notes自动化类 Interop.lotus.dll

推荐答案

在您引用的IBM.com文章中,在图1中,请注意它列出了"Lotus Notes自动化类"和"Lotus Domino对象".看起来您选择了"Lotus Notes自动化类",但是它们是OLE类,并且该引用显然是作为接口生成的.您需要第二个"Lotus Domino对象",它们是COM类.这些可以按照文档中反映的方式进行实例化.

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.

如果在引用对话框中看不到"Lotus Domino对象",则可能存在注册问题,可以通过命令 regsvr32 nlsxbe.dll (由Notes程序发出)解决文件夹).

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).

但是,您可能需要了解以下事实:Win64不支持Notes COM类(请参见此 IBM技术说明进行确认.)如果您未找到它们的注册商标,则可能是原因.它们确实可以正常工作,但是存在一些已知的问题-例如,NotesDatabase方法返回设计元素的集合.但是,如果需要确保仅使用供应商支持的API,则必须查看处理Notes数据的其他可用方法.

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.

这篇关于无法创建Lotus Notes对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 00:15