title: How to display label of unnamed drive?
body: <p>I want to get the name or label of drive.</p>
  
  <p>I use this function :</p>
  
  <pre><code>function GetVolumeLabel(DriveChar: Char): string;
  var
    NotUsed:     DWORD;
    VolumeFlags: DWORD;
    VolumeInfo:  array[0..MAX_PATH] of Char;
    VolumeSerialNumber: DWORD;
    Buf: array [0..MAX_PATH] of Char;
  begin
      GetVolumeInformation(PChar(DriveChar + ':\'),
      Buf, SizeOf(VolumeInfo), @VolumeSerialNumber, NotUsed,
      VolumeFlags, nil, 0);
  
      SetString(Result, Buf, StrLen(Buf));   { Set return result }
      Result:=AnsiUpperCase(Result)
  end;
  </code></pre>
  
  <p>For example, here're my drives in Windows Explorer :</p>
  
  <pre><code>Local Disk (C:)
  Data (D:)
  DVD RW Drive (E:)
  </code></pre>
  
  <p>The output of the code :</p>
  
  <pre><code>C: 
  D: DATA
  E:
  </code></pre>
  
  <p>The labels of C and E are empty. What winapi/function should I use to display the label of unnamed drive (C and E)?</p>