简体   繁体   English

找不到dll或依赖项

[英]Cannot find dll or dependency

I'm trying to write a C# dll for use in an Access VBA application. 我正在尝试编写在Access VBA应用程序中使用的C#dll。 The dll works fine (only) when called with full file path: 使用完整文件路径调用时,dll正常运行(仅):

Declare Function MyObject Lib "\path\to\my.dll" () As Object

despite the .dll being in the same folder. 尽管.dll位于同一文件夹中。

The problem arises however when I call another dll (Test.dll) from my.dll (also in the same folder). 但是,当我从my.dll(也位于同一文件夹中)调用另一个dll(Test.dll)时,就会出现问题。 I get: 我得到:

错误截图

I've tried adding the path to Environment Variables Path (which allowed me to declare my.dll function without full path) but that didn't work... Any help would be appreciated! 我尝试将路径添加到“环境变量路径”(允许我在没有完整路径的情况下声明my.dll函数),但是该方法不起作用...任何帮助将不胜感激!

Run depends.exe on the dll. 在dll上运行depends.exe。 If a dependency is missing vba claims it can't find the dll. 如果缺少依赖项,则vba声称找不到dll。 Go figure. 去搞清楚。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM