2个回答
展开全部
Private Declare Function hardisk 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
Private Sub Form_Load()
On Error GoTo Err_Form_Load
Dim aa As Long
Dim VolName As String
Dim disnun As Long
Dim Maxlen As Long
Dim Sysflag As Long
Dim fsysName As String
aa = hardisk("c:\", VolName, 256, disnun, Maxlen, Sysflag, fsysName, 256)
MsgBox "c 硬盘序列号(16制): " & Hex(disnun)
Exit Sub
Err_Form_Load:
End Sub
Private Sub Form_Load()
On Error GoTo Err_Form_Load
Dim aa As Long
Dim VolName As String
Dim disnun As Long
Dim Maxlen As Long
Dim Sysflag As Long
Dim fsysName As String
aa = hardisk("c:\", VolName, 256, disnun, Maxlen, Sysflag, fsysName, 256)
MsgBox "c 硬盘序列号(16制): " & Hex(disnun)
Exit Sub
Err_Form_Load:
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用fso很简单
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询