怎么样才能检测SCSI硬盘物理序列号呀

邪恶的扑满 2003-08-25 10:02:32
怎么样才能检测SCSI硬盘物理序列号呀
...全文
50 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
邪恶的扑满 2003-08-26
  • 打赏
  • 举报
回复
TechnoFantasy(www.applevb.com) 您好,首先,谢谢你的回复,可是我是一个VB初学者,你所说的这个东西我该怎么使用呢,教一下我,好吗谢谢
TechnoFantasy 2003-08-25
  • 打赏
  • 举报
回复
斑竹用VC编写的DLL,可以获得硬盘的型号、序列号以及计算机 ID,带Delphi的源程序,在Win2K下通过,但是没有在Win9X下试过,感兴趣的朋友可以在Win9X 下试一下,或者编写一个VB的范例。
函数以及定义:
function ReadPhysicalDrive(driveID:integer;buffer:Pointer;bufLen:integer):integer; stdcall; external 'DiskID.dll' name 'ReadPhysicalDriveInNT';
获得WinNT下的硬盘型号以及序列号。参数driveID为硬盘的位置,IDE1上的主盘为0,类推到IDE2上的从盘的driveID为3。
function ReadPhysicalDrive9X(driveID:integer;buffer:Pointer;bufLen:integer):integer; stdcall; external 'DiskID.dll' name 'ReadDrivePortsInWin9X';
获得Win9X下的硬盘型号以及序列号。参数同上
function getHardDriveComputerID:int64; stdcall; external 'DiskID.dll' name 'getHardDriveComputerID';
获得计算机的ID

http://www.applevb.com/lib/diskio.rar

已经经过测试,支持scsi
邪恶的扑满 2003-08-25
  • 打赏
  • 举报
回复
可是老大,我想要的是硬盘出厂时的那个唯一的序列号,不是磁盘的卷标
lihonggen0 2003-08-25
  • 打赏
  • 举报
回复
api
GetVolumeInformation 只能得到逻辑盘的序列号
分区后就变了


硬盘序列号
http://vip.6to23.com/NowCan1/tech/vb_hd_info.htm
http://vip.6to23.com/NowCan1/code/hd_info.zip
www.jiaxinda.com/dont_delete/98及2K取硬盘id号_类.exe
lzj34 2003-08-25
  • 打赏
  • 举报
回复
UP
dandy1437 2003-08-25
  • 打赏
  • 举报
回复
新建一个模文件,加入代码:

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



Global GethdVal As Long



在form1_load事件中加入

Dim Str1 As String * 256

Dim Str2 As String * 256

Dim Lon1 As Long

Dim Lon2 As Long

Call GetVolumeInformation("C:\", Str1, 256, GetVal, Lon1, Lon2, Str2, 256)



Text1.Text = GethdVal
hxy2003 2003-08-25
  • 打赏
  • 举报
回复
UP

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧