title: How to get manufacturer serial number of an USB flash drive?
body: <p>How can I retrieve the manufacturer serial number of an USB flash drive in Delphi ?</p>
  
  <p>I have tried this:</p>
  
  <pre><code>function GetDiskVolSerialID(ADriveName: Char): Cardinal;
  var
    DiskDrive: string;
    FileSystemFlags: DWORD;
    VolumeSerialNumber: DWORD;
    MaximumComponentLength: DWORD;
  begin
    DiskDrive := ADriveName + ':\';
    GetVolumeInformation(PChar(DiskDrive),
                         nil,
                         0,
                         @VolumeSerialNumber,
                         MaximumComponentLength,
                         FileSystemFlags,
                         nil,
                         0);
    Result := VolumeSerialNumber;
  end;
  </code></pre>
  
  <p>But it doesn't return correct result!</p>