<Return[G]><Top>

GetVolumeSerialNumber

Declare Function Api_GetVolumeSerialNumber& Lib "kernel32" Alias "GetVolumeInformationA" (ByVal PathName$, ByVal VolNameBuff&, ByVal VolNameSize&, VolSerialNum&, ByVal MaxComponentLen&, ByVal FileSysFlags&, ByVal FileSysNameBuff&, ByVal FileSysNameSize&)

Declare Function GetVolumeSerialNumber 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

ディスクドライブのシリアル番号を取得する。

パラメータ
lpRootPathName

    UCase$(DriveLetter) & ":\"

lpVolumeNameBuffer

    0
nVolumeNameSize

    0

lpVolumeSerialNumber

    SerialNo

lpMaximumComponentLength

    0

lpFileSystemFlags

    0

lpFileSystemNameBuffer

    0

nFileSystemNameSize

    0

 

戻り値