楼主可以考虑新建个 AutuRun 类型,指定自己的启动类型,根据需要判定。 具体注册表位置可以参照:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlersMSDN可以参照: (Autoplay in Windows XP: Automatically Detect and React to New Devices on a System) http://msdn.microsoft.com/en-us/magazine/cc301341.aspx
如何禁用 Windows 中的自动运行功能 http://support.microsoft.com/kb/967715
改下
我需要实现在我的程序启动之后,如果有设备插入电脑,通过IHWEventHandler来判断是否我需要处理的设备,如果是的话,通过这个接口告诉系统不需要弹出系统的AutoPlay。有哪位知道怎么处理的,请讲的详细点,谢谢
具体注册表位置可以参照:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlersMSDN可以参照:
(Autoplay in Windows XP: Automatically Detect and React to New Devices on a System)
http://msdn.microsoft.com/en-us/magazine/cc301341.aspx
http://support.microsoft.com/kb/967715
你给的这篇文章我看过,我要实现的就是其中的Non-volume Autoplay Cancellation,但是没有实现成功我需要实现在我的程序启动之后,如果有WPD设备插入电脑,通过IHWEventHandler来判断是否我需要处理的设备,如果是的话,通过这个接口告诉系统不需要弹出系统的AutoPlay。