views:

47

answers:

1

Hi!,

I am using windows mobile device, i want to know how to get notification if the storage card is removed from the device.I have DLL it has all the imported methods which send messages if the card is added or removed, but this case works fine if the DLL is in the device memory.If the application is installed in storage card, then DLL will be in Card as soon as card removed,the DLL goes out and i will not get any information from the phone that card removed or some thing like that.i am developing application in c#.DLL code is in C++, its quite tough to port it to C#,i tried to make DLL as .lib and use in c# project,but in c# we cant use .lib files also.that is the problem. we cant load DLL to main memory like .exe file.. so i m in trouble.. can any one let me know how to come up with this.

Thanks

A: 

As I understand you're question, you're asking: How can you be notified that a storage card has been removed by a program running on the storage card?

You can't. - Once the card is removed the programs on it can't run.

If that's not you're actual question can you try rewording.

Matt Lacey
yes,u r right,but imagine there is an .exe file and associated .dll with it, when u launch the application .exe gets loaded to primary memory i.e RAM then,application uses associated DLL and necessary files. now ill take off card,means .exe is still running, associated resources and dll gone,if this is the case then.please help me..Thanks
Shadow
If the EXE was on the Device to start with, I would guess it depends on how you are linking the DLL.If the EXE was on the card I wouldn't expect it to work but don't know enough about how the OS works to justify this. I would expect there are still references to the original file even if in ROM. In the same way you normally can't delete the exe of a running app.As a rule I never run from memory cards. Even if they can't physically be removed (secure cover, etc.) I have had issues with them moving or coming loose.
Matt Lacey
But.. i want solution for this...i dont no.. is there any way to link DLL statically with app.. i hope its dumb quest?.. still u hv any idea ?
Shadow