Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
C#
[DllImport("storeapi")]
        public static extern IntPtr OpenStore(string szDeviceName);


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."
Posted
Updated 14-Mar-11 17:45pm
v3

Must be "storeapi.dll" or "coredll.dll".
—SA
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 13-Mar-11 21:58pm    
OP commented:

It doesn't matter.
I can't find this file in Windows Mobile.
Sergey Alexandrovich Kryukov 13-Mar-11 22:10pm    
1) It does matter.
2) Answer updated: could be coredll.dll, depending on you version.
3) Before doing P/Invoke, run dump of dll and see what exactly exported (use "dumpbin.exe", for example)
--SA
_Ares!!! 13-Mar-11 23:42pm    
I tried to P/Invoke with storeapi.dll but it doesn't work still :(. I think My WinCE doesn't have storeapi.dll. I need this file. Where can I get it?
Sergey Alexandrovich Kryukov 13-Mar-11 23:53pm    
You already told that. What do you mean "I think"? You could perform a global search. I don't know... How about "codedll.dll"? You suppose to have "storeapi.lib". Do you have it? You can dump it as well. You can also try native code, just to see if the DLL is there and find out which dll.
--SA
_Ares!!! 14-Mar-11 1:34am    
I can't find storeapi.dll anywhere. I tried to find this file in google but didn't have any result.
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.
 
Share this answer
 
Comments
_Ares!!! 14-Mar-11 10:40am    
Thanks for your response
Sergey Alexandrovich Kryukov 14-Mar-11 13:05pm    
Summary:
He cannot find the DLL or required API in this DLL.
After finding LIB asks question if he can convert it to DLL (which is impossible, and the lib is just a link to DLL). After I answered, he added a separate question about conversion of LIB to DLL.
I think my advice is ignored.
--SA
_Ares!!! 15-Mar-11 7:50am    
Sorry, but I didn't see what you wrote

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900