Dear Expert programmers,
If you use "dir" command in dos, you get a volume number for the drive e.g.
the C:\ -drive.
How can I get this volume ID by using Delphi 3?
I have searched the google.com for an info but to no avail.
The code should work in the following operating systems: Windows 95, 98, ME,
NT, 2000 and XP.
I am just wondering why the following function is not working for me.
function GetSerialNumber : string;
var
Name : PChar;
HDDid:dword;
begin
if GetVolumeInformation('C:\',nil,0,@SerNo,MaxCompLength,
FileSystemFlags,nil,0) then
begin
HDDid:=IntToHex(SerNo,8);
Insert('-',HDDid,5);
Name:=HDDid;
end
I sincerely thank you very much in advance for any hint. Answer by email if
possible.
Yours sincerely,
John
john.warren@netti.fi