存储卡的问题,在Windows Mobile [英] Storage Card Problem In windows mobile

查看:113
本文介绍了存储卡的问题,在Windows Mobile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我米制作的Windows Mobile应用程序,它是指一些DLL的,但我有一些问题在这里。 想象一下,我的应用程序安装在存储卡相关DLL的present在存储卡而已, 如果我启动应用程序是指某些DLL的,现在我将删除存储卡,仍然是我的应用程序将被运行,也不会它会导致重新启动我的移动设备的退出,最终只有.. 我得到的divice卡移除通知,但其在DLL和它的C ++ code ..如果取出卡没有DLL将是present在存储卡上,我不甚至得到通知也是用C#我不就没怎么获得在C#中的卡中删除的通知。如何处理这些情况,请让我知道。

I m making windows mobile application, it refers some DLL's but i have some problem here. Imagine my application is installed in storage card related DLL's present in Storage card only, if i launch application it refers some of DLL, now i will remove the storage card, still my application will be running,it will not quit only ultimately it leads to restart of my mobile device.. i do get the divice card remove notification but its in DLL and its c++ code.. if card is removed no DLL will be present in storage card, i dont even get the notification also in c# i dont no how to get the card removed notification in c#. how to handle these scenarios please let me know.

感谢

推荐答案

您可以使用该功能的 SHChangeNotifyRegister WM_FILECHANGEINFO 的消息。

You can use the function SHChangeNotifyRegister to WM_FILECHANGEINFO message.

您订阅,您将收到与IDS事件,如 SHCNE_DRIVEREMOVED SHCNE_MEDIAREMOVED 之后,这样你就可以触发当删除了一些动作的存储卡。

After you subscribe, you will be receiving events with ids such as SHCNE_DRIVEREMOVED or SHCNE_MEDIAREMOVED, so you can trigger some actions when storage card is removed.

要使用本机的功能,从紧凑的框架,使用的P / Invoke。

To use native functions from the compact framework, use P/Invoke.

这篇关于存储卡的问题,在Windows Mobile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆