我可以在Windows 8应用程序上使用interop.domino.dll吗? [英] Can I use interop.domino.dll on a windows 8 app?

查看:92
本文介绍了我可以在Windows 8应用程序上使用interop.domino.dll吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试使用Windows应用程序,它允许我访问.nsf数据库。我正在使用Visual Studio 2103并且我正在使用库interop.domino.dll但是我一直有这个错误(COMException:检索具有CLSID {29131539-2EED-1069-BF5D-00DD011186B7}的组件的COM类工厂失败到期出现以下错误:80040154)。



我的操作系统是Windows 8 x64,所以我尝试使用regvr32注册dllnlsxbe.dll然后我在x86上构建我的解决方案但我仍然有相同的错误。

有人可以告诉我是否可以在Windows 8应用程序上使用interop.domino?如果有可能,我该怎么用呢?



提前感谢你



我尝试过:



查看我正在使用的代码:

Hello,
I’m trying to do a Windows App which allows me to access to an .nsf database. I’m working Visual Studio 2103 and I’m using the library interop.domino.dll but I keep having this error (COMException : Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 80040154).

My OS it’s Windows 8 x64, so I tried to register the dll "nlsxbe.dll" using regvr32 then I build my solution on x86 but I’m still having the same error.
Can somebody tell me if it is possible to use interop.domino on an Windows 8 App? And if it is possible, how can I use it?

Thanking you in advance

What I have tried:

Look the code I'm using:

private NotesSession _lotesNotesSession = null;
//private NotesSession _lotusNotesServerSession = null;
private NotesDatabase _localDatabase = null;
private NotesView _contactsView = null;
//private NotesDatabase _serverDatabase = null;
//private NotesView _peopleView = null;

public bool SessionStart(string DominoServerName, string NotesPassword)
{
    try
    {
        if (_lotesNotesSession == null)
        {
            //Lotus Notes Object Creation
            _lotesNotesSession = new NotesSession();
            //Initializing Lotus Notes Session
            _lotesNotesSession.Initialize(NotesPassword);
            //Creating Lotus Notes DataBase Object
            _localDatabase = _lotesNotesSession.GetDatabase("", "names.nsf", false);
            //creating Lotus Notes Contact View
            _contactsView = _localDatabase.GetView("Contacts");

        }//end if(_lotesNotesSession==null )
    }//end Try
    catch
    {
        return false;
    }
    return true;
}

推荐答案

Interopdll只是一个围绕COM对象的.net包装器(COM就是这样的技术)在.net之前。为了工作,你需要安装和工作的原始COM对象\应用程序,并且interop dll允许你的.net应用程序与它进行交互。因此,您需要在要运行.net代码的计算机上安装domino(无论是什么)。
"Interop" dlls are simply a .net wrapper around a COM object (COM is the technology that was around before .net). In order to work you need the original COM objects\application installed and working also, and the interop dll allows your .net app to interact with it. So you need "domino" (whatever that is) installed on the machine you want to run your .net code on.


这篇关于我可以在Windows 8应用程序上使用interop.domino.dll吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆