Function GetSerialNumber(sRoot As String) As Long Dim lSerialNum As Long Dim R As Long Dim sTemp1 As String, sTemp2 As String strLabel = String$(255, Chr$(0)) ' 磁盘卷标 strType = String$(255, Chr$(0)) ' 文件系统类型 一般为 FAT R = GetVolumeInformation(sRoot, strLabel, Len(strLabel), lSerialNum, 0, 0, strType, Len(strType)) GetSerialNumber = lSerialNum '在 strLabel 中为 磁盘卷标 '在 strType 中为 文件系统类型 End Function