主 题:取得硬盘出厂ID的DLL,谁要?留下E-MAIL(内有广告,三日内给分)
作 者:dbcontrols
所属论坛:Visual Basic
问题点数:142
回复次数:84
发表时间:2001-12-11 9:48:15
最新消息:
http://www.wzjcw.net/vbgood/taishan/index.html
作 者:dbcontrols
所属论坛:Visual Basic
问题点数:142
回复次数:84
发表时间:2001-12-11 9:48:15
最新消息:
http://www.wzjcw.net/vbgood/taishan/index.html
不要告诉我你解决的办法是用一个固定的或是取磁盘卷标号代替哦~~
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://www.csdn.net/expert/topic/390/390633.shtm
但是我要在VB6调用啊。
'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
那个不是我写的 我没有那本事 我也不知道 不过我听网友说可以 所以我就贴了
dwOemID As Long
dwPageSize As Long
lpMinimumApplicationAddress As Long
lpMaximumApplicationAddress As Long
dwActiveProcessorMask As Long
dwNumberOrfProcessors As Long
dwProcessorType As Long
dwAllocationGranularity As Long
dwReserved As Long
End Type
Private Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)Private Sub Command1_Click()
Dim len5 As Long, aa As Long
Dim sysinfo As SYSTEM_INFO
Call GetSystemInfo(sysinfo)
End Sub注:
dwProcessorType
Platform Value
============ ===============================
Windows 95 PROCESSOR_INTEL_386 = 386
PROCESSOR_INTEL_486 = 486
PROCESSOR_INTEL_PENTIUM = 586
Windows NT PROCESSOR_INTEL_386
PROCESSOR_INTEL_486
PROCESSOR_INTEL_PENTIUM
PROCESSOR_MIPS_R4000 4000
PROCESSOR_ALPHA_21046 21046