I'm using a treeview in my app, and I have to insert a item for each cd player that is present on the pc.
With cd player I mean a device that can play audio cd (cdrom, cdburner, dvd, ...).
I want to know the label of the device (d:, e:,...), the label of the cd and the icon of the device.
The item should look like the items in explorer

How can I do this?
Posted on 2003-12-05 12:21:33 by greenant
GetLogicalDriveStrings gives you a little list of all available drives
then a GetDriveTypeA on them should tell you what 'type of drive' they are
cdrom, fixed, remote, removable etc GetVolumeInformationA should give you the
volume name etc etc
Posted on 2003-12-05 12:39:42 by evlncrn8
With these funcitons I can get only some of the information I need.
Now I can get wich units are CDROM and the volume label, if the cdrom is in the drive.
But I want also know:
1) the name of the unit if the cdrom is't in the drive.
E.g: In my pc, if no floppy is in the drive, next to the folppy icon I can read "Floppy da 3,5 pollici (A:)"
And near the cdplayer "Unit? CD (D:)"
How can I get these strings?

2) The icon of the drive. If the drive is empty or the cd doesn't have its own icon, windows choose a default icon. If the cd has its own Icon, windows display the custom Icon. I want to get this icon
Posted on 2003-12-06 09:05:56 by greenant
common sense aint it...
getlogicaldrivestrings and a getdrivetype interrogation, gives you the drive letter and drivetype, now if no volume is present in the drive (getvolumeinformation will fail) then you display the drive letter and fancy up the names, for example your 'Floppy Drive A' .. getdrivetypea will return removable for the drive, so you can call it 'floppy disk' and you already have the drive letter

why not go debug explorer ;)
Posted on 2003-12-06 10:34:44 by evlncrn8
Some programs, like SmartFtp, Nero Burning Rom, have a treeview like explorer treeview. They display those "foncy names" and icons I want to display.
So there are some functions that let me know these labels & icons

If u don't know these functions don't say "go debug explorer". Just say nothing or "I don't know. I can't help you"

Maybe I have to use shell interface. Now I searching info into the msdn
Posted on 2003-12-06 11:30:55 by greenant

Posted on 2003-12-06 12:06:33 by greenant