The code above in your post from 16 Jan 2008 1:13:14 can not work correctly on any computer IMHO, especially here, when I write this answer.
At first, the Uni2Ansi() is missing.
If I insert the Procedure, that jack pointed at in the other thread, I get this:
Debugger wrote:drive: 2 is ID: \\?\ide#cdromhl-dt-st_dvdram_gsa-4163b_______________a106____#334b354333313242313020322020202020202020#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
Media Type is Unknown or no media loaded
HL-DT-ST
DVDRAM GSA-4163B
A106
\\?\Volume{fcfbbcce-478a-11dc-bd62-806d6172696f}\
Your Drive Path is: Y:\
Environment is supported!
Device can eject and reload media!
Legacy number is: 1
Recorder is supported
\\?\ide#cdromhl-dt-st_dvdram_gsa-4163b_______________a106____#334b354333313242313020322020202020202020#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
drive: 2 is ID: \\?\ide#cdromtsstcorp_cd#dvdw_sh-s182d_______________sb06____#5&39971a7a&0&0.1.0#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
Media Type is Unknown or no media loaded
HL-DT-ST
DVDRAM GSA-4163B
A106
\\?\Volume{fcfbbcce-478a-11dc-bd62-806d6172696f}\
Your Drive Path is: Y:\
Environment is supported!
Device can eject and reload media!
Legacy number is: 1
Recorder is supported
\\?\ide#cdromhl-dt-st_dvdram_gsa-4163b_______________a106____#334b354333313242313020322020202020202020#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
[/b]
It debuggs output twice for "drive: 2", a third drive I don't have !
If I replace
Code: Select all
Debug "drive: " +Str(count) +" is ID: " +Uni2Ansi(pp\bstrval)
by
Code: Select all
Debug "drive: " +Str(x) +" is ID: " +Uni2Ansi(pp\bstrval)
I get this:
Debugger wrote:drive: 0 is ID: \\?\ide#cdromhl-dt-st_dvdram_gsa-4163b_______________a106____#334b354333313242313020322020202020202020#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
Media Type is Unknown or no media loaded
HL-DT-ST
DVDRAM GSA-4163B
A106
\\?\Volume{fcfbbcce-478a-11dc-bd62-806d6172696f}\
Your Drive Path is: Y:\
Environment is supported!
Device can eject and reload media!
Legacy number is: 1
Recorder is supported
\\?\ide#cdromhl-dt-st_dvdram_gsa-4163b_______________a106____#334b354333313242313020322020202020202020#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
drive: 1 is ID: \\?\ide#cdromtsstcorp_cd#dvdw_sh-s182d_______________sb06____#5&39971a7a&0&0.1.0#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
Media Type is Unknown or no media loaded
HL-DT-ST
DVDRAM GSA-4163B
A106
\\?\Volume{fcfbbcce-478a-11dc-bd62-806d6172696f}\
Your Drive Path is: Y:\
Environment is supported!
Device can eject and reload media!
Legacy number is: 1
Recorder is supported
\\?\ide#cdromhl-dt-st_dvdram_gsa-4163b_______________a106____#334b354333313242313020322020202020202020#{53f56308-b6bf-11d0-94f2-00a0c91efb8b}
Now the drives are "enumerated" correctly, but the rest of the debug-output for drive 1 is the same as for drive 0, which is not correct, as they are different models from different vendors with different media inside to test.
If someone reads and tries the code above, who has installed more than 1 drive (like me) and does not know about the other thread, he will most probably fail and be disappointed.
That, and only that, was my point, as I truely respect your work because it led me to a proc I can now use in my video-database to determine the media my movies are on.