# Re: 如何取得指定磁碟的 serial volume 序号

Posted by 霈捷 on July 17, 1998 at 10:49:03:

In Reply to: 如何取得指定磁碟的 serial volume 序号 posted by 陈春雨 on July 16, 1998 at 18:34:51:

: 请教各方高手,该如何在vb中取得指定磁碟的serial volume 序号??
: 有没有现成的函数??
: ps.不是磁碟的label哦!!

用GetVolumeInformation API
Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long

Follow Ups: