sparky
sparky

Reputation: 375

IMAPI2 How to to associate the UniqueID with the drive letter

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.

Upvotes: 0

Views: 1038

Answers (1)

competent_tech
competent_tech

Reputation: 44931

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.

Upvotes: 2

Related Questions