If i use GetVolumeInformation on a CD drive with no disc in the drive it returns 0, if I then go on to use GetLastError that also returns 0 - shouldn't it be returning some nice error code for me? or do I presume that if the result of GetVolumeInformation is 0 then there is no disc in the drive?

Heres a snippet of the code I'm using, I may be using GetLastError wrong as I've never used it before.

VB Code:
  1. If GetVolumeInformation(sDrives(l), sLabel, 255, lSerial, 0, 0, sFilesystem, 255) = 0 Then
  2.         'Error when retrieving volume information, probably no disc in drive
  3.         MsgBox GetLastError
  4.        
  5.         Dim sError As String * 255
  6.        
  7.         FormatMessage FORMAT_MESSAGE_FROM_SYSTEM, ByVal 0&, GetLastError, LANG_NEUTRAL, sError, 255, ByVal 0&
  8.        
  9.         MsgBox sError
  10.       End If

Help appreciated.