[fpc-pascal] How to read VolumeID on a CD (or DVD)?

Tomas Hajny XHajT03 at mbox.vol.cz
Sat Jul 2 01:43:24 CEST 2005

Date sent:      	Thu, 30 Jun 2005 11:49:24 -0400
From:           	Rolf Grunsky <rgrunsky at sympatico.ca>
To:             	FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Subject:        	[fpc-pascal] How to read VolumeID on a CD (or DVD)?
Send reply to:  	FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
	<mailto:fpc-pascal-request at lists.freepascal.org?subject=unsubscribe>
	<mailto:fpc-pascal-request at lists.freepascal.org?subject=subscribe>

> I am trying to read the VolumeID from a DVD (or a CD) and find that
> r := FindFirst(Drive, faVolumeID, Sr);
> Does not work (at least not with Win2000.) Not a surprise I suppose
> since this will not work in OS/2. So the question is, how do I do it?
> The only reference I can find in the documentation refers to
> FindFirst/Next which does not work.
> Is this something that has been left out?

Well, I'm not sure what you mean exactly. First of all, you're right 
that FindFirst/Next doesn't provide VolumeID on anything other than 
plain DOS (it's only emulated even under Dos, in fact). We don't 
provide platform-independent function to read volume IDs in our RTL 
(it wouldn't be really platform independent anyway).

If your reference to something "left out" was related to missing 
documentation for such a function, then I'm sorry, but we don't 
provide documentation for the complete platform APIs - you need to 
refer to something like MSDN for Win32 documentation. However, being 
no Win32 programmer myself, I found function GetVolumeInformation 
while searching through sources of unit Windows - I guess this should 
the right bet for you.

Hope this helps


More information about the fpc-pascal mailing list