捕获添加安装点事件C# [英] Capture add mountpoint event c#

查看:181
本文介绍了捕获添加安装点事件C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定是否有添加mountpoint事件之类的事情,所以让我解释一下.我希望在将新驱动器添加到我的计算机并将NTFS文件夹设置为c#中的卷的挂载点时得到通知.我可以通过使用ShRegisterChangeNotify和Windows窗体来解决新的驱动器事件,但是还有另一种方法,因为此代码可能将在Windows服务中使用?
在此先感谢所有人.

I''m not sure that there is such thing as add mountpoint event so let me explain. I whish to be notified when new drive is added to my computer and NTFS folder is set as mount point for volume in c#. I was able to solve new drive event by using ShRegisterChangeNotify and windows form, but is there a another way because this code is probably going to be used in windows service?
Thanks all in advance.

推荐答案

您可能会在WMI中找到一些内容, ^ ]
You might find something in WMI, http://msdn.microsoft.com/en-us/library/windows/desktop/aa394572%28v=vs.85%29.aspx[^]


这篇关于捕获添加安装点事件C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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