Sijith
Sijith

Reputation: 3960

How to get the drive letter of pendrive

I want to get the drive letter of pendrive or external harddisk connected through USB. Is it possible to get the Drive letter. I am using VC++

Upvotes: 3

Views: 1000

Answers (1)

wRAR
wRAR

Reputation: 25569

GetLogicalDriveStrings lists all existing drive letters and GetDriveType can determine whether the drive is removable. GetDriveType help suggests using SetupDiGetDeviceRegistryProperty to make sure the drive is USB one.

Upvotes: 4

Related Questions