Howard Bates
Member
Thread Starter
- Joined
- Sep 10, 2013
- Messages
- 6
- Likes
- 0
As well as a virtual drive created by Virtual CloneDrive (VCD), I have a physical optical drive and a virtual drive created by the emulation program Virtual CD. I can interrogate the latter two drives to find out what kind of media or image is present, but VCD does not appear to support this capability.
Is there any possibility that you might add this functionality to VCD ? It would be very helpful.
For information, here is the code I use :
Dim dev As Object ' Object for IMAPI optical drive device
Dim medtype As Integer ' Media (optical disc) type currently in drive
Dim profile As Variant ' Object which holds information about device profile
Dim rst as New ADODB.Recordset ' General purpose ADODB recordset
Dim uuid As String ' Unique ID for optical drive device
... code to find drive in database
uuid = rst![OPT_UUID] ' Get unique ID for optical drive (from database)
Set dev = New IMAPI2.MsftDiscRecorder2 ' Create optical drive (recorder) object
dev.InitializeDiscRecorder (uuid) ' Initialise optical drive information
For Each profile In dev.CurrentProfiles ' Get profile ID for current optical disc
Exit For ' Terminate loop - only need first profile
Next
medtype = profile ' Get current media type for drive
Here are the values returned for the variable 'medtype' :
0 -- no media present
8 CD CD-DA / CD-ROM / finalized
9 CD-R CD-R (writable)
10 CD-RW CD-RW (writable)
16 DVD DVD-A / DVD-ROM / DVD-V
18 DVD-RAM DVD-RAM (always writable)
26 DVD-RW DVD-RW (writable)
27 DVD-R DVD-R (finalized or writable)
43 DVD DL DVD DL (finalized or writable)
64 BD Bluray (all types)
65 BD-R BD-R (finalized or writable)
67 BD-RE BD_RE (finalized or writable)
Physical drives always identify their media correctly.
Virtual CD drives returns correct values for images, even for drives which are defined as read-only devices.
Unfortunately, in all cases, with any type of image loaded, a VCD drive returns 0.
Is there any possibility that you might add this functionality to VCD ? It would be very helpful.
For information, here is the code I use :
Dim dev As Object ' Object for IMAPI optical drive device
Dim medtype As Integer ' Media (optical disc) type currently in drive
Dim profile As Variant ' Object which holds information about device profile
Dim rst as New ADODB.Recordset ' General purpose ADODB recordset
Dim uuid As String ' Unique ID for optical drive device
... code to find drive in database
uuid = rst![OPT_UUID] ' Get unique ID for optical drive (from database)
Set dev = New IMAPI2.MsftDiscRecorder2 ' Create optical drive (recorder) object
dev.InitializeDiscRecorder (uuid) ' Initialise optical drive information
For Each profile In dev.CurrentProfiles ' Get profile ID for current optical disc
Exit For ' Terminate loop - only need first profile
Next
medtype = profile ' Get current media type for drive
Here are the values returned for the variable 'medtype' :
0 -- no media present
8 CD CD-DA / CD-ROM / finalized
9 CD-R CD-R (writable)
10 CD-RW CD-RW (writable)
16 DVD DVD-A / DVD-ROM / DVD-V
18 DVD-RAM DVD-RAM (always writable)
26 DVD-RW DVD-RW (writable)
27 DVD-R DVD-R (finalized or writable)
43 DVD DL DVD DL (finalized or writable)
64 BD Bluray (all types)
65 BD-R BD-R (finalized or writable)
67 BD-RE BD_RE (finalized or writable)
Physical drives always identify their media correctly.
Virtual CD drives returns correct values for images, even for drives which are defined as read-only devices.
Unfortunately, in all cases, with any type of image loaded, a VCD drive returns 0.