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

直接从RING3获取硬盘序列号

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
re use.  Must be zero.
End Type

Private Type TSENDCMDINPARAMS
    cBufferSize As Long   ''Buffer size in bytes
    irDriveRegs As TIDEREGS   ''Structure with drive register values.
    bDriveNumber As Byte   ''Physical drive number to send  ''command to (0,1,2,3).
    bReserved(2) As Byte   ''Reserved for future expansion.
    dwReserved(3) As Long   ''For future use.
    ''''BYTE  bBuffer(1)   ''Input buffer.
End Type

Private Type TDRIVERSTATUS
    bDriverError As Byte  ''Error code from driver, ''or 0 if no error.
    bIDEStatus  As Byte  ''Contents of IDE Error register.
           ''Only valid when bDriverError ''is SMART_IDE_ERROR.
    bReserved(1) As Byte   ''Reserved for future expansion.
    dwReserved(1) As Long   ''Reserved for future expansion.
End Type

Private Type TSENDCMDOUTPARAMS
    cBufferSize As Long      ''Size of bBuffer in bytes
    DRIVERSTATUS As TDRIVERSTATUS   ''Driver status structure.
    bBuffer(511) As Byte   ''Buffer of arbitrary length
             ''in which to store the data read from the drive.
End Type

''下面的结构是要从另一结构复制数据过来的,所以,必须是字节数与VC的完全一致
''而不能用兼容变量,但这里的我们还是用了兼容变量,Integer,因为此结构中这一
''类型的的变量程序中没有用到,如果要用到,建议改为Byte类型。因为VB没有USHORT

Private Type TIDSECTOR
    wGenConfig As Integer
    wNumCyls As Integer
    wReserved As Integer
    wNumHeads As Integer
    wBytesPerTrack As Integer
    wBytesPerSector As Integer
    wSectorsPerTrack As Integer
    wVendorUnique(2) As Integer
    sSerialNumber(19) As Byte
    wBufferType As Integer
    wBufferSize As Integer
    wECCSize As Integer
    sFirmwareRev(7) As Byte
    sModelNumber(39) As Byte
    wMoreVendorUnique As Integer
    wDoubleWordIO As Integer
    wCapabilities As Integer
    wReserved1 As Integer
    wPIOTiming As Integer
    wDMATiming As Integer
    wBS As Integer
    wNumCurrentCyls As Integer
    wNumCurrentHeads As Integer
    wN
  • 下一篇资讯: vb中使用正则表达式
  • 网学推荐

    免费论文

    原创论文

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