加载C库(gsdll32.dll)从Metro风格应用C# [英] Load C library (gsdll32.dll) from Metro Style App c#
本文介绍了加载C库(gsdll32.dll)从Metro风格应用C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用gsdll32.dll从Metro风格应用C#。我加载DLL如下:
I want to use gsdll32.dll from Metro Style App c#. I load dll as follow:
[DllImport("gsdll32.dll", EntryPoint = "gsapi_delete_instance")]
private static extern void gsapi_delete_instance(IntPtr instance);
[DllImport("gsdll32.dll", EntryPoint = "gsapi_revision")]
private static extern int gsapi_revision(ref GS_Revision pGSRevisionInfo, int intLen);
[DllImport("gsdll32.dll", EntryPoint = "gsapi_set_stdio")]
private static extern int gsapi_set_stdio(IntPtr lngGSInstance, StdioCallBack gsdll_stdin, StdioCallBack gsdll_stdout, StdioCallBack gsdll_stderr);
但是,当我尝试加载的dll未发现异常发生。我已经把它在调试文件。但它的工作。
But when I try to load dll not found exception occurs. I have already put it in Debug file. But it does work.
从我的此链接。
推荐答案
有可以的,但是:
- 是gsdll32.dll针对WinRT的SDK编译
- 是否gsdll32。 DLL传递应用程序认证?
- 是否包含该dll在你的包?
如果回答任何这些问题是否,那么你的代码将无法正常工作。
If the answer to any of those questions is "no", then your code will not work.
这篇关于加载C库(gsdll32.dll)从Metro风格应用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文