drive list, drive type and drive name
-
hello, in my current project, I need to store the original file path of files. But they can come from many unit types : FD, local HD, network HD, CD writer, DVD rom etc.... So, for a given computer (the local machine !)I need to know : - The drive list - the type of each drive - the name of each unit (HD name, CD ROM name if one is inserted in the CD Reader..) I did not find out how to do that in VC++, is there anybody out there who can help me , please ?:confused: You guys, who are so smart I've a new question : how to know if a unit is a CD Writer, a DVD writer ? Thank you very much for the so numerous and efficient answer ! :-D :-D (hope make me live !) Best regards Guy LECOMTE
-
hello, in my current project, I need to store the original file path of files. But they can come from many unit types : FD, local HD, network HD, CD writer, DVD rom etc.... So, for a given computer (the local machine !)I need to know : - The drive list - the type of each drive - the name of each unit (HD name, CD ROM name if one is inserted in the CD Reader..) I did not find out how to do that in VC++, is there anybody out there who can help me , please ?:confused: You guys, who are so smart I've a new question : how to know if a unit is a CD Writer, a DVD writer ? Thank you very much for the so numerous and efficient answer ! :-D :-D (hope make me live !) Best regards Guy LECOMTE
For a start, check GetLogicalDriveStrings, GetDriveType and GetVolumeInformation. Tomasz Sowinski -- http://www.shooltz.com
-
hello, in my current project, I need to store the original file path of files. But they can come from many unit types : FD, local HD, network HD, CD writer, DVD rom etc.... So, for a given computer (the local machine !)I need to know : - The drive list - the type of each drive - the name of each unit (HD name, CD ROM name if one is inserted in the CD Reader..) I did not find out how to do that in VC++, is there anybody out there who can help me , please ?:confused: You guys, who are so smart I've a new question : how to know if a unit is a CD Writer, a DVD writer ? Thank you very much for the so numerous and efficient answer ! :-D :-D (hope make me live !) Best regards Guy LECOMTE
GetLogicalDrives -- returns a bitmask representing the currently available disk drives. GetLogicalDriveStrings -- fills a buffer with strings that specify valid drives in the system. GetDriveType -- determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. The Win32_CDROMDrive WMI(Windows Management Instrumentation ) class represents a CD-ROM drive on a Win32 computer system. Check the MediaType property whose values are Values are: "Random Access" "Supports Writing" "Removable Media" "CD-ROM" Atul :suss: Don't they know that java is slow. :suss: