如何检测时,插入SD卡?SD

2023-09-03 00:39:52 作者:孤独快把我掐死了

我正在写在C中的PC应用程序++,需要在用户的SD卡连接到他/她的计算机检测。我知道如何检测,当卡读卡器连接,但我不知道如何检测时,各个卡连接/移除。

I'm writing a PC application in C++ that needs to detect when a user connects an SD card to his/her computer. I know how to detect when the card reader is connected, but I do not know how to detect when individual cards are connected/removed.

Windows能否有一个IO接口检测SD卡到货/去除?

Does Windows have an IO interface to detect arrival/removal of SD cards?

[更新]的WM_DEVICECHANGE技术,建议仅适用于在SD卡读卡器插入检测,不检测,当个人卡插入读卡器。

[Update] the WM_DEVICECHANGE technique that was suggested works only for detecting when an SD Card reader is plugged in. It does not detect when individual cards are inserted into the card reader.

推荐答案

想这是你需要的:

HTTP://www.$c$cproject.com/KB/ DOTNET / devicevolumemonitor.aspx