title: vb.net: VolumeSerialNumber vs. vb6 GetVolumeInformation
body: <p>In VB6 I am getting the serial number of a volume like this:</p>
  
  <pre><code>Temp1 = String$(255, Chr$(0))
  Temp2 = String$(255, Chr$(0))
  r = GetVolumeInformation(uDrive, Temp1, StrLen(Temp1), lSerialNumber, 0, 0, Temp2, StrLen(Temp2))
  
  GetPartitionSerialNumber = lSerialNumber
  </code></pre>
  
  <p>In VB.NET I use</p>
  
  <pre><code>    Dim disk As System.Management.ManagementObject = New System.Management.ManagementObject("win32_logicaldisk.deviceid=""" + uDrive + ":""")
      disk.Get()
      Dim SerialNumber As String = disk("VolumeSerialNumber").ToString()
  </code></pre>
  
  <p>VB6 returns -1870518177, but VB.NET returns 9082285F.</p>
  
  <p>Can somebody tell me what I need to do to also get the result -1870518177 in .NET?</p>
  
  <p>Thank you!</p>