当前位置: 网学 > 编程文档 > VB > 正文

直接从RING3获取硬盘序列号

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
s Byte
    
    If (j And 1) = 1 Then
        in_data.irDriveRegs.bDriveHeadReg = &HB0
    Else
        in_data.irDriveRegs.bDriveHeadReg = &HA0
    End If
    If (vers.fCapabilities And (16 \ (2 ^ j))) = (16 \ (2 ^ j)) Then
        ''We don''t detect a ATAPI device.
        hdid9x = "Drive " & CStr(j + 1) & " is a ATAPI device, we don''t detect it"
    Else
          in_data.irDriveRegs.bCommandReg = &HEC
          in_data.bDriveNumber = j
          in_data.irDriveRegs.bSectorCountReg = 1
          in_data.irDriveRegs.bSectorNumberReg = 1
          in_data.cBufferSize = 512
          
          lRet = DeviceIoControl(h, DFP_RECEIVE_DRIVE_DATA, in_data, Len(in_data), out_data, Len(out_data), ByVal i, olp)
          
          If lRet = 0 Then
              hdid9x = "DeviceIoControl failed:DFP_RECEIVE_DRIVE_DATA"
              CloseHandle (h)
              Exit Function
          End If
          
          Dim StrOut As String
          
          CopyMemory phdinfo, out_data.bBuffer(0), Len(phdinfo)
          
          CopyMemory s(0), phdinfo.sModelNumber(0), 40
          s(40) = 0
          ChangeByteOrder s, 40
          
          StrOut = ByteArrToString(s, 40)
          
          hdid9x = hdid9x & vbCrLf & "Module Number:" & StrOut
          CopyMemory s(0), phdinfo.sFirmwareRev(0), 8
 &nbs
  • 下一篇资讯: vb中使用正则表达式
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号