- 积分
- 2468
- 明经币
- 个
- 注册时间
- 2004-7-22
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-12-31 13:49:00
|
显示全部楼层
Function GetSerialNumber(strDrive As String) As Long Dim SerialNum As Long Dim Res As Long Dim Temp1 As String Dim Temp2 As String Temp1 = String$(255, Chr$(0)) Temp2 = String$(255, Chr$(0)) Res = GetVolumeInformation(strDrive, Temp1, Len(Temp1), SerialNum, 0, 0, Temp2, _ Len(Temp2)) GetSerialNumber = SerialNum End Function 调用形式 Label1.Caption = GetSerialNumber("c:\") |
|