Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


How to detect removable storage insertion ? filter_list
Author
Message
How to detect removable storage insertion ? #1
Hello everyone

Sorry if the subject little bit confusing .

I'm beginner in C , I need to write a program to detect when a removable storage is inserted to my computer and return the letter of that storage for example : E , F ...etc
I'm using visual studio 2017.

thank you

Reply

RE: How to detect removable storage insertion ? #2
I don't know C, but here is a C# guide you can use, should help some until one of the C guys hops on.
https://www.codeguru.com/columns/dotnet/...ing-c.html
(This post was last modified: 01-09-2018, 09:38 PM by Ecks.)
[Image: tm06mQ3.gif]
If my threads help you feel free to Like and Rep
Keybase | https://keybase.io/ecks  ProtonMail | n3r0nu77@protonmail.com  Steam | Nu77v47u3  Discord | Ecks#2162


Reply

RE: How to detect removable storage insertion ? #3
(01-09-2018, 09:38 PM)Ecks Wrote: I don't know C, but here is a C# guide you can use, should help some until one of the C guys hops on.
https://www.codeguru.com/columns/dotnet/...ing-c.html

Thank you Ecks , I appreciate your help Smile

Reply

RE: How to detect removable storage insertion ? #4
Well, for Windows, the API "RegisterDeviceNotification" lets you know if a USB device is added. You can get the information about the volume from the "DEV_BROADCAST_VOLUME" structure. The "dbcv_unitmask" gives the drive letter.

Reply







Users browsing this thread: 1 Guest(s)