无法PInvoke函数"OpenStore"在WinCE 5.0中 [英] Can't PInvoke function "OpenStore" in WinCE 5.0
本文介绍了无法PInvoke函数"OpenStore"在WinCE 5.0中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
我尝试使用PInvoke函数"OpenStore","DismountStore"等,但是很遗憾,我收到了这样的消息:"找不到PInvoke DLL" storeapi" "
代码段
Hi All!
I''ve tried to PInvoke function "OpenStore", "DismountStore" and so on, but unfortunately I''ve got message like this "Can''t find PInvoke DLL ''storeapi''."
code snippet
[DllImport("storeapi")]
public static extern IntPtr OpenStore(string szDeviceName);
有人可以帮我吗?
我关闭了这个问题!!!
原因:
我通过C ++对storeapi.lib进行了包装.它编译很棒!但是,如果我从那里调用函数,则会出现错误120!
这表示此功能在该平台上无效."
Could someone help me?
I closed this question!!!
Reason:
I made wrapper around storeapi.lib through C++. It compiles great! But if I invoke functions from there I get error 120!
It means "This function is not valid on this platform."
推荐答案
必须为"storeapi.dll"或"coredll.dll".—SA
Must be "storeapi.dll" or "coredll.dll".
—SA
您需要做的是通过将storeapi.lib文件链接到该文件来创建非托管DLL(使用C ++).此时,您可以PInvoke到新创建的DLL.我相信这是最好/唯一的方法.
What you need to do is create an unmanaged DLL (using C++) by linking the storeapi.lib file to it. At that point, you can PInvoke to your newly created DLL. I believe it''s the best/only way.
这篇关于无法PInvoke函数"OpenStore"在WinCE 5.0中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文