没有win7、win8的实验环境,我笔记本肯定是ata接口的,没碰到过有硬盘接口的问题。我平时是用api解决的,代码如下:
'***************************************************************************
Private 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
Dim a As String, sn As Long, i As Long
i = GetVolumeInformation("c:\", a, 0, sn, 0, 0, a, 0)
if i<>0 then msgbox "硬盘系列号为:" & hex(sn) '用十六进制显示硬盘系列号