【发布时间】:2021-07-02 22:34:01
【问题描述】:
我正在使用 JNA 与 Windows API 交互。
我想在WinBase.h 标头中使用LogonUserW function。为了使用 JNA 的Native.load 加载它,我需要知道动态链接库的名称。
比如CredReadW在WinCred.h头中,通过例子我发现这个函数是advapi32.dll提供的,所以我可以用:
// WinCrypt is my own interface. I'm not sure why it's WinCrypt instead of WinCred,
// but that's what I saw in other examples.
Native.load("Advapi32", WinCrypt.class);
Here's the example this is based on.
我真的需要使用 DUMPBIN 检查 Windows 中的每个 dll 以找到它吗?我希望 Microsoft 提供更好的方法来找到这些。
【问题讨论】: