首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >正确访问Notes中的DLL,或者Lotus Notes中的NativeCall出现错误

正确访问Notes中的DLL,或者Lotus Notes中的NativeCall出现错误
EN

Stack Overflow用户
提问于 2015-06-26 23:08:08
回答 1查看 137关注 0票数 0

我正在尝试使用Lotus Notes中的NativeCall dll来调用它。但是,此代码不会运行并引发

代码语言:javascript
复制
  UnsupportedOperationException on NativeCall.init()

我需要把它放在别的地方吗?谢谢。

代码语言:javascript
复制
import com.eaio.*;
import com.eaio.nativecall.IntCall;
import com.eaio.nativecall.NativeCall;

import java.io.*;
class WindowsUtils {

public static final int SM_REMOTESESSION = 4096;  // remote session
//Session.getPlatform() = Windows/16 or /32
private WindowsUtils() {}

     public static boolean isRemote() throws SecurityException, UnsatisfiedLinkError,
                                       UnsupportedOperationException, IOException
     {
       NativeCall.init();
        ntCall ic = null;
        try {
        ic = new IntCall("user32", "GetSystemMetrics");
        int rc = ic.executeCall(new Integer(SM_REMOTESESSION));
        System.out.println(rc);
        return true;
        //return (rc gt; 0);
        }
        finally {
            if (ic != null) ic.destroy();
         }
    }

    public static void main(String ... args) throws Exception {
        System.out.println(WindowsUtils.isRemote());
    }
}
EN

回答 1

Stack Overflow用户

发布于 2015-06-27 22:21:04

根据注释中提供的信息,问题是无法加载NativeCall.dll,因为它是为Win64编译的,而Notes客户端代码是Win32。即使在SysWOW64仿真下运行,Win32代码也不能加载64位动态链接库。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31076588

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档