Jan 10, 2003 #1 NuWood Programmer Mar 14, 2002 44 GB Hi I feel a bit dumb asking this one but how can I read the label from a CDROM (or any disk drive for that matter). It seems quite simple but the answer has eluded me so far.
Hi I feel a bit dumb asking this one but how can I read the label from a CDROM (or any disk drive for that matter). It seems quite simple but the answer has eluded me so far.
Jan 10, 2003 Thread starter #2 NuWood Programmer Mar 14, 2002 44 GB Found the answer procedure Tform1.ToolButton1Click(Sender: TObject); var VolumeName, FileSystemName: array [0..MAX_PATH - 1] of Char; VolumeSerialNo: DWord; MaxComponentLength, FileSystemFlags: Cardinal; begin GetVolumeInformation('F:\', VolumeName, MAX_PATH, @VolumeSerialNo, MaxComponentLength, FileSystemFlags, FileSystemName, MAX_PATH); Memo1.Lines.Add( 'VName = ' + VolumeName); Memo1.Lines.Add( 'SerialNo = $ ' + IntToHex(VolumeSerialNo, 8)); Memo1.Lines.Add( 'CompLen = ' + IntToStr(MaxComponentLength)); Memo1.Lines.Add( 'Flags = $' + IntToHex(FileSystemFlags, 4)); Memo1.Lines.Add( 'FSName = ' + FileSystemName); end; VNAME gives the label.... Found this on the DELPHI POOL http://www.lmc-mediaagentur.de/dpool.htm a great site full of tips. It is not a forum as such just a load of how tos? a nice compliment to tek-tips Upvote 0 Downvote
Found the answer procedure Tform1.ToolButton1Click(Sender: TObject); var VolumeName, FileSystemName: array [0..MAX_PATH - 1] of Char; VolumeSerialNo: DWord; MaxComponentLength, FileSystemFlags: Cardinal; begin GetVolumeInformation('F:\', VolumeName, MAX_PATH, @VolumeSerialNo, MaxComponentLength, FileSystemFlags, FileSystemName, MAX_PATH); Memo1.Lines.Add( 'VName = ' + VolumeName); Memo1.Lines.Add( 'SerialNo = $ ' + IntToHex(VolumeSerialNo, 8)); Memo1.Lines.Add( 'CompLen = ' + IntToStr(MaxComponentLength)); Memo1.Lines.Add( 'Flags = $' + IntToHex(FileSystemFlags, 4)); Memo1.Lines.Add( 'FSName = ' + FileSystemName); end; VNAME gives the label.... Found this on the DELPHI POOL http://www.lmc-mediaagentur.de/dpool.htm a great site full of tips. It is not a forum as such just a load of how tos? a nice compliment to tek-tips