Jas*_*son 6 c# pinvoke dllimport
我正在从 c# 调用以下内容:
[DllImport("u3dapi10.dll", CharSet=CharSet.Auto)]
public static extern uint dapiCreateSession(out uint hSession);
Run Code Online (Sandbox Code Playgroud)
.NET 在哪里寻找 u3dapi10.dll 文件?这以前有效,但现在我收到了 DLLNotFoundException。
u3dapi10.dll 文件在项目的根目录下。我尝试将它复制到 bin/debug 目录只是为了看看会发生什么,但它也找不到它。
可能的原因:这可能是由于 u3dapi10.dll 不兼容 64 位造成的吗?例如,如果您尝试从 64 位计算机访问 32 位 dll,是否会抛出 DllNotFoundException?或者它会在加载 32 位 DLL 时按照 BadImageFormatException 的建议抛出 BadImageFormatException ,目标是 x86
| 归档时间: |
|
| 查看次数: |
2813 次 |
| 最近记录: |