http://ygyuan.go.163.com/
http://ygyuan.3322.net/
下载并安装"雁留声名录系统",然后你就可以得到第一个硬盘的序列号了!Private Declare Function GetDiskSN Lib "GetDiskSN.dll" (ByVal lpszSN As String) As DoubleDim s As String
s = String(1024, Chr(0))
GetDiskSN (s)
s = Trim(Replace(s, Chr(0), ""))
msgbox s
http://ygyuan.3322.net/
下载并安装"雁留声名录系统",然后你就可以得到第一个硬盘的序列号了!Private Declare Function GetDiskSN Lib "GetDiskSN.dll" (ByVal lpszSN As String) As DoubleDim s As String
s = String(1024, Chr(0))
GetDiskSN (s)
s = Trim(Replace(s, Chr(0), ""))
msgbox s
解决方案 »
- vb中sql数据库另存为excel,高手请进!
- VB写的程序运行时提示"运行时错误'429' ACTIVEX部件不能创建对象"
- 关于在MSHFLEXGRID中显示图片的问题
- 急死人了????????????
- 对一个文件如何编写其阅读器?(来者有分,帮忙)
- 我的msdn上的连接都实效了?
- 窗体间参数传递
- 急急。。。使用excel模板打印发票,如何实现只用excel预览,然后直接打印,代码如何实现?
- vb聊天程序 字体,颜色问题 急 在线等`````
- 关于消息的的问题。
- 在Win98下可以用SetWindowWord(Me.hwnd, -8, frmMain.hwnd)使一个窗口位于本程序所有窗口之上,但是在Win2000下就不行了,请问该如何调用?注意不是所有窗口,是本程序。
- 关于程序窗口的问题!
'you will get two different serail number for the two drives.
'It seems as if logical drives get their own serial number...
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
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Dim Serial As Long, VName As String, FSName As String
'Create buffers
VName = String$(255, Chr$(0))
FSName = String$(255, Chr$(0))
'get the volume information
GetVolumeInformation "C:\", VName, 255, Serial, 0, 0, FSName, 255
'Strip the extra chr$(0)'s
VName = Left$(VName, InStr(1, VName, Chr$(0)) - 1)
FSName = Left$(FSName, InStr(1, FSName, Chr$(0)) - 1)
MsgBox "The Volume name of C:\ is '" + VName + "', the File system name of C:\ is '" + FSName + "' and the serial number of C:\ is '" + Trim(Str$(Serial)) + "'", vbInformation + vbOKOnly, App.Title
End Sub