所以我使用SDK作为硬件随机数生成器,它提供了一个名为PsyREG.dll的dll用于与之交互,以及一些c#source用于使用dll中的方法.
它过去曾奏效,但不知怎的,它已停止运作.我的手有点束缚,因为我现在实际上无法访问有问题的设备,所以我不能尝试很多东西......
然而,这是奇怪的事情.dll在那里,它始终是同一个地方.Ahd实际上File.Exists("PsyREG.dll")返回true,我已经双重检查,这与提供的c#source导入它的方式完全相同,例如[DllImport("PsyREG.dll")].
有任何想法吗?
我刚刚开始使用ZeroMQ并正在试验一些样本.我正在使用C#语言绑定并遇到了获取DllNotFound异常的问题.
将libzmq.dll复制到Windows/System32之后,我可以在我的开发机器上加载和运行样本,但是当我将其移动到其他服务器时,尽管将libzmq.dll复制到样本运行的文件夹中,我仍然会收到错误.进入Windows/System32.
我已将clzmq.dll放入示例应用程序所在的文件夹中,并且libzmq.dll此外,我将libzmq放入c:/ Windows/System32.我正在运行Windows Server 2003 Service Pack 2.当我检查机器环境变量时,WINDOWS/System32在PATH变量中.我还确定使用Release构建libzmq dll,而不是调试.
有可能我不明白应该如何使用ZeroMQ .Net绑定.我已将clzmq.dll(.Net Binding)添加到我的项目作为参考,我假设clzmq.dll会自动引用Windows PATH变量WINDOWS/System32上的libzmq.
有谁知道我是否对此有误.C#Binding文档(http://www.zeromq.org/bindings:clr)声明"ZeroMQ库文件需要可用于绑定才能工作",但它接缝我尽管无法使其可用将其复制到PATH变量中.
使用ZeroMQ .Net Bindings时是否有人遇到过DLL未找到的异常?
谢谢您的帮助,
编辑(整个问题,它太不清楚了)
我想使用OpenSSL.NET
OpenSSL.NET安装说明页面:INSTALL
确保在应用程序的当前工作目录或PATH中有libeay32.dll和ssleay32.dll.DONE
在.NET项目中,添加对ManagedOpenSsl.dll程序集的引用.DONE
我已经把libeay32.dll
和ssleay32.dll
两个我bin/Debug
和bin/Release
目录.我也把它们放进去了system32
.
这是我的完整代码:
using System;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
try
{
OpenSSL.Crypto.RSA rsa = new OpenSSL.Crypto.RSA();
}
catch (Exception e)
{
Console.WriteLine(e.InnerException.Message);
}
Console.Read();
}
}
}
Run Code Online (Sandbox Code Playgroud)
我收到以下错误: 无法加载DLL'libeay32'http://localhostr.com/files/a719c5/Error.gif (无法加载DLL'libeay32')
这是Process Monitor日志(根据要求): alt text http://localhostr.com/files/726a46/ProcMon.gif
我究竟做错了什么?为什么找不到DLL?
我在我的c#项目中使用c ++ dll,它在我的窗口xp机器上运行正常,但是当我在window 2003服务器(x64)上复制我的调试项目时,我收到下面的错误,任何人都可以告诉我这是什么问题,并且我该怎么办呢.
谢谢
"System.DllNotFoundException:无法加载DLL'lib.dll':此应用程序无法启动,因为应用程序配置不正确.重新安装应用程序可能会解决此问题"
我不知道原因,但可能是因为最近更新了macOS 10.13.1 (17B48)
.几周前曾经工作过的代码只是因为这个错误而崩溃了
"无法加载DLL'Crypt32.dll':无法找到指定的模块.\n(HRESULT异常:0x8007007E)"
它只发生在macos而不是生产平台(docker linux).它被抛出了lambda.GetFunctionConfigurationAsync
导入配置已<PackageReference Include="AWSSDK.Lambda" Version="3.3.*" />
恢复为AWSSDK.Core 3.3.19
dotnet --info .NET命令行工具(2.1.0-preview1-006547)
产品信息:版本:2.1.0-preview1-006547提交SHA-1哈希:3471d43796
运行时环境:操作系统名称:Mac OS X OS版本:10.13操作系统平台:Darwin RID:osx.10.12-x64基本路径:/usr/local/share/dotnet/sdk/2.1.0-preview1-006547/
Microsoft .NET核心共享框架主机
版本:2.0.3 Build:a9190d4a75f4a982ae4b4fa8d1a24526566c69df
我最近一直想弄明白这一点.它正在我的Windows机器上工作,我从NuGet获得了SQLite,但......
当我把System.Data.SQLite.dll
和SQLite.Interop.dll
直接从我的Windows机器到Linux服务器,它说的是SQLite.Interop.dll
没有找到,但我相信我看到它旁边的可执行的权利.
然后我试图编译System.Data.SQLite.dll
使用/p:UseInteropDll=false
,但没有运气.这次它说System.Data.SQLite.dll
找不到.
这个"未被发现"的谜团是什么?
我下载了zlib并将该库编译为Windows 32位和Windows 64位dll.我现在zlibwapi.dll
和zlibwapi64.dll
.
dll被复制到我的应用程序文件夹中,引用如下:
[DllImport(@"zlibwapi.dll", EntryPoint = "uncompress", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = false)]
private static extern int uncompress32(
IntPtr dest,
ref uint destLen,
[In(), MarshalAs(UnmanagedType.LPArray)] byte[] source,
uint sourceLen
);
[DllImport(@"zlibwapi64.dll", EntryPoint = "uncompress", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = false)]
private static extern int uncompress64(
IntPtr dest,
ref uint destLen,
[In(), MarshalAs(UnmanagedType.LPArray)] byte[] source,
uint sourceLen
);
Run Code Online (Sandbox Code Playgroud)
在运行时,我检查我是32位还是64位,并调用适当的版本.
如果我是32位,这可以正常工作,但64位版本给出
无法加载DLL"zlibwapi64.dll":找不到模块.(HRESULT例外:0x8007007E)
我在互联网上发现了许多类似的问题,建议的原因是该库依赖于其他一些库,而且可能找不到那些库. …
c# pinvoke dllnotfoundexception dllimport visual-studio-2008
我正在尝试使用ZeroMQ C#-binding(http://www.zeromq.org/bindings:clr)与我在Unity中创建的游戏服务器进行通信(我使用的是Mac OS X 10.8).因此,我创建了一个简单的函数,它连接到服务器,发送消息然后接收消息:
using UnityEngine;
using System.Runtime.InteropServices;
using System.Collections;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZeroMQ;
public class NetworkZero : MonoBehaviour {
// Use this for initialization
public static NetworkZero instance;
void Start () {
instance = this;
Debug.Log("START NETWORK COMMUNICATION");
}
// Update is called once per frame
void Update () {
using (ZMQ.Context context = new ZMQ.Context(1))
using (ZMQ.Socket client = context.Socket(ZMQ.SocketType.REQ))
{
string sendMSG = "CLIENT";
client.Connect("tcp://localhost:31415");
client.Bind("tcp://localhost:31415");
client.Send(sendMSG, Encoding.Unicode); …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Ubuntu 18.04上运行的.Net Core Console应用程序中使用System.Drawing.Common创建位图,但是一旦执行代码,它将向我显示:
“ Gdip”的类型初始值设定项引发了异常。 在System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32宽度,Int32高度,Int32跨度,Int32格式,HandleRef scan0,IntPtr和位图) 在System.Drawing.Bitmap..ctor处(Int32宽度,Int32高度,PixelFormat格式) 在/home/MidnightBot/Modules/AdminCommands.cs:line 125中的MidnightBot.Modules.AdminCommands.CreatePollAsync(String Term1,String Term2,String Description)中 System.DllNotFoundException:无法加载DLL'libgdiplus':找不到指定的模块。 在System.Runtime.InteropServices.FunctionWrapper`1.get_Delegate()处 在System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr&令牌,StartupInput&输入,StartupOutput&输出) 在System.Drawing.SafeNativeMethods.Gdip..cctor()
谢谢你的帮助。
我们的软件是用 C# 编写的,需要连接到 SAP。由于我们的一些客户使用旧版本的 SAP,而其他客户没有 SAP PI,因此我们无法通过 Web 服务进行连接。
我尝试通过 SAP NetWeaver 远程函数调用库 (sapnwrfc.dll) 连接到 SAP,如下所示:
运行此代码会出现 DllNotFoundException:
Unable to load DLL 'sapnwrfc.dll': This application has failed to start because the application configuration is不正确。重新安装应用程序可能会解决此问题。(来自 HRESULT 的异常:0x800736B1)
运行标准的 connect-to-C++-from-C# 示例
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type);
MessageBox(new …
我在尝试dll
从我的应用程序中使用非托管代码时遇到了一些困难(用C#framework 4.0编写).我正在使用dll
导入如下
[DllImport(@"C:\MGW_SDK.dll", EntryPoint = "fInicializaSDK")]
public static extern int fInicializaSDK();
Run Code Online (Sandbox Code Playgroud)
奇怪的是,从我的开发环境(Windows XP)调用时,它工作得很好,但是当在生产服务器(Windows7)上时,它会生成以下异常:
System.DllNotFoundException
:无法加载DLL' C:\MGW_SDK.dll'
:找不到指定的模块.于:(0x8007007E从HRESULT异常)Comtpaq.AdminPack.SDKWrapper.fInicializaSDK()
在Comtpaq.AdminPack.AdminPaqRepository.InitializeSDK()
中C:\Work\AgroIn\AdminPaqRepository.cs
:第30行
我已经运行了Dependency Walker,它将以下依赖关系显示为冲突:C:\windows\system32\SHLWAPI.DLL
我已经尝试将其复制dll
到我的部署目录
该MGW_SDK.dll
是c:\
(作为路径说)
我已经安装了C运行时库
我还注意到一些有趣的东西:在例外情况下,开发路径正在显示 C:\Work\AgroIn\AdminPaqRepository.cs:line 30
还有什么可能是这里的问题?
我用一个extern
/ dllimport
我使用的方法构建了一个小型控制台应用程序MGW_SDK.dll
并且运行它没有问题(没有DllNotFoundException
任何问题),所以这似乎与我正在构建的应用程序(WCF服务)有关.此服务托管在WAS上,但我仍然无法找到问题.
我有一个使用SQLite的C#应用程序,可以在Windows上正常运行.
相同的Visual Studio项目在Xamarin Studio中编译得很好,但在运行时我得到:
DllNotFoundException: SQLite.Interop.dll
Run Code Online (Sandbox Code Playgroud)
尽管:
libsqlite3.0.dylib
是/usr/lib
,也以相同的文件夹作为可执行文件和其他DLL.
是的一部分 $DYLD_LIBRARY_PATH
<the_exe_or_dll_including_filename_extension>.config
文件,其中包含:<configuration>
<dllmap dll="sqlite" target="libsqlite.0.dylib" os="osx"/>
<dllmap dll="sqlite3" target="libsqlite3.0.dylib" os="osx"/>
</configuration>
我也尝试过添加<dllmap dll="SQLite.Interop.dll" target="libsqlite3.0.dylib" os="osx"/>
,而不是更好.
问题是什么?
我正在维护一个小型.NET应用程序,它在.NET shell中加载GeckoFX webview.它适用于绝大多数计算机,但在一台特定的64位Windows 7计算机上,它会报告以下异常:
Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: monoclecatdesktop.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4db67550
Problem Signature 04: Skybound.Gecko
Problem Signature 05: 1.9.1.0
Problem Signature 06: 4db625ff
Problem Signature 07: 54
Problem Signature 08: 87
Problem Signature 09: System.DllNotFoundException
OS Version: 6.1.7600.2.0.0.768.3
Locale ID: 4105
Run Code Online (Sandbox Code Playgroud)
我尝试使用Dependency Walker找到丢失的DLL,但没有任何东西跳出来.我是Windows编程的新手,所以我不知道从哪里开始调试.任何建议表示赞赏!