



时间:2011-04-25 关注公众号 来源:网络
代码:
FunctionGetSerialNumber(srootAsString)AsLong
DimlSerialNumAsLong
DimRAsLong
DimsTemp1AsString,sTemp2AsString
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中为文件系统类型
EndFunction
用法:
当驱动器不存在时,函数返回0。如果是个非根目录,也将返回0:
lSerial=GetSerialNumber("c:\")->
文章内容来源于网络,不代表本站立场,若侵犯到您的权益,可联系我们删除。(本站为非盈利性质网站)
电话:13918309914
QQ:1967830372
邮箱:rjfawu@163.com