开发者

Plug-and-play API for detecting/interfacing Flash drive insertions?

开发者 https://www.devze.com 2023-03-04 00:38 出处:网络
Is there a way to provide a call to a user-define开发者_JAVA百科d program after a plug-and-play flash drive has been inserted and detected by Windows?No, Microsoft finally figured out that autorun pro

Is there a way to provide a call to a user-define开发者_JAVA百科d program after a plug-and-play flash drive has been inserted and detected by Windows?


No, Microsoft finally figured out that autorun programs are a huge security risk, and no longer will start an application when a drive is inserted.

However, an application that's already installed and running can be notified when a drive is inserted. Is that sufficient? Look up WM_DEVICECHANGE and specifically the DBT_DEVICEARRIVAL w/DBT_DEVTYP_VOLUME case.

0

精彩评论

暂无评论...
验证码 换一张
取 消