Question

I have the following code:

        foreach (string uniqueRecorderID in discMaster)
        {
            MsftDiscRecorder2 discRecorder2 = new MsftDiscRecorder2();
            discRecorder2.InitializeDiscRecorder(uniqueRecorderID);
            comboBox1.Items.Add(discRecorder2);

        }
        comboBox1.SelectedIndex = 0;

The problem with this is that i want to show the drive letter in the combobox, so the user can select the drive he likes to use but still be able to use the selected drive's UniqueID to be able to burn the disc afterwards.

so is there any way to associate the UniqueID with the drive letter?

Thank you all.

Was it helpful?

Solution

You can use the VolumePathNames property associated with the recorder. This contains a list of the drive letters and NTFS mount points for the device.

The drive letter should be in discRecorder2.VolumePathNames [0], but you can cycle through the list and add all of the items if you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top