[fpc-pascal]RE: MD5 & Volume Label

Rolf Grunsky rgrunsky at sympatico.ca
Wed Aug 14 06:02:02 CEST 2002


Many thanks to all!

The MD5 unit has just worked. I like things like that ;)

The volume label for the CD has turned out to be more interesting.

I decide to go with a Win32 program. OS/2 will limit the returned label
to 11 characters (at least for all the examples I tried.) The windows
version will return longer labels but I had to make the following
change:

from pszVolName : array[0..11] of char;
to pszVolName : array[0..31] of char;

If the volume label was 11 characters or less and all upper case, then
an 11 character buffer (plus null) was adequate. However, if the label
was longer, or the label contained lower case characters,
GetVolumeInformation would return a null string and a zero serial
number. Expanding the field to 31 characters (the ISO standard I
believe) worked for all the disks I tried. One of the CDs I test with as
an AOL disc. The label was "Try-Essayez AOL", upper and lower case. This
appears properly (but truncated) in OS/2 but with an 11 character name
field in windows it returned an empty string. With a 31 character field
it appeared properly. Moral, leave more room. What is maximum volume
label for Joloit CD? 64 characters?

And of course, OS/2 and Windows return different serial numbers.

Since I do what I can with OS/2 and only do what I must with Windows,
I've decide to scan and build the csv files with Windows and then import
them into the database running on OS/2.

Anyway, many thanks.

Rolf Grunsky

-- 

RGrunskyAtSympaticoDotCa  Truth in her dress finds facts too tight.
                          In fiction she moves with ease.
                          Rabinranath Tagore




More information about the fpc-pascal mailing list