试一下这个函数:<br><br>function GetHDSerialNumber(Drv : ShortString): LongInt;<br>//var pp : PChar;<br>{$IFDEF WIN32}<br>var<br> pdw : pDWord;<br> mc, fl : dword;<br>{$ENDIF}<br>begin<br> {$IfDef WIN32}<br> New(pdw);<br> //pp := StrPCopy(pp,Copy(Drv,1,1)+':/');<br> GetVolumeInformation(nil,nil,0,pdw,mc,fl,nil,0);<br> Result := pdw^;<br> dispose(pdw);<br> {$ELSE}<br> Result := GetWinFlags;<br> {$ENDIF}<br>end;<br>