Sparkie wrote: (Or maybe I'm making a mountain out of a molehill

)
I hope I didn't show you the wrong track.
I'm programming a database for moviefiles, like MediaMonkey for MP3 and will most probably give the source to the community because of the large amount of help I've already gotten.
When I discovered MediaInfo.dll to get some infos directly from the moviefiles, I decided to try the same with the media they are on. I'm not that good when it comes to do researches, but I found 4 ways to get these infos on optical media:
1.
WMI / Win32_PhysicalMedia, from
http://msdn2.microsoft.com/en-us/library/aa394346.aspx
Problem: Neither with PB nor VBS or the M$-tools(Scriptomatic, WMI Code Creator) I was able to retrieve the promised infos.
2.
IMAPI2, from
http://msdn2.microsoft.com/en-us/library/aa364821.aspx]
I played a little bit with the VBS, but my knowledge is too small to use it frop within PB using the 2 libs from PureArea.net.
I also discovered, that the recognition only seems to work correctly with EMPTY Media.
3.
Book Type Field, from
http://en.wikipedia.org/wiki/Book_type
I found no infos, how to read the lead-in from a CD/DVD from within PB.
Or I just don't understand similar code.
4.
Windows Driver Kit, from
http://msdn2.microsoft.com/en-us/library/ms809046.aspx
Here we are at the end of a small story, that possibly nobody is interested in
Back to your code:
It works, but some results are unexpected:
Code: Select all
Mediumtyp |DVD-ROM|DVD-RAM|DVD-R|DVD-R DL|DVD-RW|DVD+RW|DVD+R|DVD+RW DL|DVD+R DL|
----------------+-------+-------+-----+--------+------+------+-----+---------+--------+
Wikipedia bin |0000 |0001 |0010 |0010 |0011 |1001 |1010 |1101 |1110 |
Wikipedia dec |0 |1 |2 |2 |3 |9 |10 |13 |15 |
DVD_Layer_Descr |0 |1 |2 |-- |3 |9 |-- |-- |-- |
----------------+-------+-------+-----+--------+------+------+-----+---------+--------+
Sparkie.pb ;) |0000 |1011 |0010 | ------ |------|1001 |0000 |---------|--------|
----------------+-------+-------+-----+--------+------+------+-----+---------+--------+
DVDInfoBookType |DVD-ROM|DVD-RAM|DVD-R| ------ |------|DVD+RW|DVD+R|---------|--------|
DVDInfoMediaType|DVD-ROM|DVD-RAM|DVD-R| ------ |------|DVD+RW|DVD+R|---------|--------|
----------------+-------+-------+-----+--------+------+------+-----+---------+--------+
cdrecord |DVD-ROM|DVD-RAM|DVD-R| ------ |------|DVD+RW|DVD+R|---------|--------|
----------------+-------+-------+-----+--------+------+------+-----+---------+--------+
DVDInfo: DVD+Rx4 get the BookType DVD-ROM, while DVD+Rx8 geht DVD+R. Weird.
I don't use or have all of the possible Media but I'll try to buy and burn a single one for the missing ones the next days.
back to coding... scholly
Sorry 4 my poor English, it's the only one I learned 40 years ago...
since 17.12.08: XPHome(SP3) + PB 4.30