在64位系统上的Lotus Domino:无法创建自动化对象,错误208 [英] Lotus Domino on 64 bit system: Could not create automation object, error 208

查看:371
本文介绍了在64位系统上的Lotus Domino:无法创建自动化对象,错误208的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经根据使用Release/AnyCPU创建了C#.NET DLL http://www-01.ibm.com/support/docview.wss?uid=swg21230705 并成功将其注册为COM Interop.

I have created a C# .NET DLL with Release/AnyCPU as per http://www-01.ibm.com/support/docview.wss?uid=swg21230705 and successfully registered it for COM Interop.

当我在32位Windows 10上打开32位Excel并使用代码时

When I open my 32bit Excel on a 32bit Windows 10, and use the code

Private Sub CommandButton1_Click()
    Dim obj As Variant
    Set obj = CreateObject("MyTest")
    MsgBox obj.AppendStr("This is")
End Sub

它返回期望值.当我在64位Windows 8.1上打开32位Excel并使用相同的代码时,它还会返回预期值.在两个系统上部署的类似制作的VB6可执行文件也是如此.

it returns the expected values. When I open 32bit Excel on a 64 bit Windows 8.1, and use the same code, it also returns the expected values. The same goes for a similarly crafted VB6 executable deployed on both systems.

但是当我使用代码在Notes 32位中尝试相同的操作

But when I try the same from Notes 32 bit using the code

Sub Click(Source As Button)
    Dim obj As Variant 
    set obj = CreateObject("MyTest") 
    MsgBox obj.AppendStr("This is")
End Sub

  • 它在32位Windows 10上返回期望值
  • 在64位Windows 8.1上引发错误无法创建自动化对象"
  • 此外,这对我来说是最有趣的部分,当在64位Windows Server系统上的Domino 64位服务器上作为LotusScript http代理运行时,它抛出无法创建自动化对象".

    Furthermore, and this is the most interesting part for me, it throws "Could not create automation object" when run as a LotusScript http agent on the Domino 64 bit server on a 64 bit Windows Server system.

    您是否知道如何使DLL函数调用与32位和64位Lotus Domino Server一起使用?

    Do you have any ideas how I could get the DLL function call to work with both 32 as well as 64 bit Lotus Domino Server?

    或者还有其他方法可以从Notes中调用C#DLL中的单个函数,该函数将单个字符串作为参数并返回字节数组? (例如,通过Java代理,通过Domino壳对象还是通过这两者?)

    Or are there any other ways to call a single function in my C# DLL from Notes, which takes a single string as parameter and returns a byte array? (e.g. through a Java agent, through a Domino shell object, or both?)

    推荐答案

    我刚刚找到了解决方案,这根本不是Domino的问题.链接的教程适用于64位之前的系统,并显示:

    I just found the solution, and it wasn't a Domino problem at all. The linked tutorial is for pre-64bit systems and says:

    1. 要通过COM接口访问此DLL中的对象,请输入以下命令:
      刷新MyTest.dll
    1. To make the objects in this DLL accessible via the COM interface, enter the following command:
      regasm MyTest.dll

    自从AMD64引入以来,您必须阅读以下步骤:

    Since the introduction of AMD64, you have to read this step as follows:

    1. 要通过32位和64位应用程序的COM接口访问此DLL中的对象,请输入 BOTH (BOTH )以下命令:

    1. To make the objects in this DLL accessible via the COM interface for both 32 bit and 64 bit applications, enter BOTH the following commands:

    %Windir%\Microsoft.NET\Framework\<version>\regasm MyTest.dll
    %Windir%\Microsoft.NET\Framework64\<version>\regasm MyTest.dll
    

    我只做第一个,所以它只能在32位上工作,而不能在64位上工作.

    I only did the first, which made it work for 32bit, but not for 64bit.

    这篇关于在64位系统上的Lotus Domino:无法创建自动化对象,错误208的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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