zoukankan      html  css  js  c++  java
  • 64位驱动开发及驱动签名

    1.WINDOWS 64位 和 32位 程序中数据类型的字节大小基本不变, 除了指针变成8字节, 其他类型的字节大小和32位一样。 
    2.对于64位驱动和32位应用程序之间通讯的数据结构, 需要将指针(包括句柄)的定义改为对应的固定长度的指针。 比如PCHAR c需要改为 CHAR* POINTER_32 c 
    3.64位驱动程序需要由64位的安装程序来安装。在64位系统下,32位安装程序对注册表和文件的访问可能会被重定向到Wow6432Node, SysWOW64之类的路径。
    4. 修改INF文件以满足安装64位驱动的要求。http://www.microsoft.com/whdc/archive/64inf_reqs.mspx 
    5.在64位下编译驱动要用X64编译选项(也就是AMD64) 

    测试驱动签名方法:

    使用签名工具dseo13b.exe(Driver Signature Enforcement Overrider),启动该工具,点击”Sign a system file”, 然后填入驱动的详细路径,点击确认, 稍等一会就可以。 

    Supported OSes
    * Windows Vista 32-bit
    * Windows Vista 64-bit
    * Windows Server 2008 32-bit
    * Windows Server 2008 64-bit
    * Windows 7 32-bit
    * Windows 7 64-bit

    还可以购买证书来签名

    脚本:

    @echo off
    rem ################################
    rem 生成CAT文件(如果是32位驱动则把X64换成X86)
    rem 
    rem inf2cat /driver:files/ /os:XP_X86,Server2003_X86,Vista_X86,Server2008_X86
    inf2cat /driver:files/DrvSetup-x64/winVista /os:XP_X64,Server2003_X64,Vista_X64,Server2008_X64
    rem ################################
    rem 对sys文件进行签名
    rem
    signtool.exe sign /ac "MSCV-VSClass3.cer" /s "My" /n "Beijing Venustech Cybervision Co., Ltd" /t "http://timestamp.verisign.com/scripts/timstamp.dll" "files\driver-x64\eposfsf.sys"
    signtool.exe sign /ac "MSCV-VSClass3.cer" /s "My" /n "Beijing Venustech Cybervision Co., Ltd" /t "http://timestamp.verisign.com/scripts/timstamp.dll" "files\driver-x64\eposfsf.cat"
    rem ################################
    signtool.exe sign /ac "MSCV-VSClass3.cer" /s "My" /n "Beijing Venustech Cybervision Co., Ltd" /t "http://timestamp.verisign.com/scripts/timstamp.dll" "files\DrvSetup-x64\winVista\lpsimd.sys"
    signtool.exe sign /ac "MSCV-VSClass3.cer" /s "My" /n "Beijing Venustech Cybervision Co., Ltd" /t "http://timestamp.verisign.com/scripts/timstamp.dll" "files\DrvSetup-x64\winVista\tdifw_drv.sys"
    signtool.exe sign /ac "MSCV-VSClass3.cer" /s "My" /n "Beijing Venustech Cybervision Co., Ltd" /t "http://timestamp.verisign.com/scripts/timstamp.dll" "files\DrvSetup-x64\win2003\netsf.cat"
    signtool.exe sign /ac "MSCV-VSClass3.cer" /s "My" /n "Beijing Venustech Cybervision Co., Ltd" /t "http://timestamp.verisign.com/scripts/timstamp.dll" "files\DrvSetup-x64\winVista\netsf_m.cat"

    pause

  • 相关阅读:
    使用Python通过docker api控制docker容器
    windows 编译 google v8
    Kali下Metasploit自动连接postgresql
    更新Kali中的metasploit
    spring + mybatis 注解式事务不回滚的原因分析 @Transactional
    ListView中使用type需要注意的东西 java.lang.ArrayIndexOutOfBoundsException: length=2; index=2 addScrapView
    Missing artifact com.sun:tools:jar:1.5.0的解决方案
    0919-The Standard of Code Review
    重定向URL乱码问题
    hive学习_01
  • 原文地址:https://www.cnblogs.com/ahuo/p/2337169.html
Copyright © 2011-2022 走看看