Click here to Skip to main content
15,910,787 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi,

I need some code or reference for detecting an USB drive (whether it is connected or not, if yes what is its drive letter etc.)

Thanks in advance.
Posted
Updated 16-Jun-18 8:35am
v2

GetLogicalDriveStrings and then GetDriveType
 
Share this answer
 
Comments
Archit9373284448 31-Oct-10 9:07am    
ummm , man i am not comfortable with this one is there any possible code for it so that i can study, i am a REAL NOOB in C++ ... i googled it but no use.

thanks though
cariolihome 1-Nov-10 19:26pm    
Try to read msdn
http://msdn.microsoft.com/en-us/library/aa364975(v=VS.85).aspx
Its first link in google
Or type "How i can use GetLogicalDriveStrings" in google :))
hello I might be late
but for future users who are looking for a reference code i found a similar sample in code project but to note it is in C#

A USB Library to Detect USB Devices[^]

hope this helps everyone
 
Share this answer
 
Comments
Dave Kreskowiak 16-Jun-18 15:24pm    
Late? Oh yeah, only by 8 YEARS.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900