VBA Excel找不到DLL [英] VBA Excel Cannot find DLL

查看:403
本文介绍了VBA Excel找不到DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在尝试在Excel工具中向Power Analyzer添加控件。该公司提供USB驱动程序以及适当的模块和DLL。我将DLL添加到System32文件夹中,以确保在路径中读取它们。导入模块并尝试运行程序后,出现错误找不到文件。然后,我尝试对DLL的位置进行硬编码,并收到相同的错误。

I am currently trying to add control to a Power Analyzer in an excel tool. The company provides USB drivers and the appropriate modules and DLLs. I added the DLLs to the System32 folder to ensure they were read in the path. After importing the modules and trying to run the program, I get the error "File Not Found". I then tried to hard code the location of the DLL and I received the same error.

我环顾了互联网,发现的唯一问题可能是DLL中缺少依赖项。我要使用的一行示例是:

I've looked around the internet and the only issue I could find was possibly a dependency missing from the DLL. An example of the line I'm trying to use is:

Declare Function TmSend Lib "tmctl.dll" (ByVal id As Long, ByVal msg As String) As Long

此行是制造商提供的模块的一部分。有什么我想让它起作用的吗?在联系制造商之前,我想确定一下。

This line is apart of the module provided by the manufacturer. Is there something I'm missing to get this to work? I want to make sure before I contact the manufacturer.

编辑:

看来制造商上载了损坏的DLL,导致出现此问题。当使用Dependency Walker检查文件时,它甚至无法读取DLL。

It appears that the manufacturer uploaded a corrupt DLL causing the issue to arise. When checking the file with Dependency Walker, it failed to even read the DLL.

推荐答案

我从您的问题中看到,您已经尝试了所有正常的操作(确保dll在您的路径上& c。)

I see from your question that you've tried all the normal things (making sure the dll is on your path &c.)

您现在需要仔细检查dll。下载此文件: http://www.dependencywalker.com/

You now need to examine the dll carefully. Download this: http://www.dependencywalker.com/

然后使用它打开您的dll。所有缺少的从属dll将被清楚地显示。

Then use it to open your dll. All the missing dependent dlls will be clearly displayed. Put those on your path too and you're done.

(为消除混乱:您无需注册该dll或添加对它的引用。)

(To clear up some confusion: you will not need to register this dll or add a reference to it.)

这篇关于VBA Excel找不到DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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