转自:Create a kernel-mode driver project for Windows Phone

demo视频:http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651%28v=vs.85%29.aspx


Create a kernel-mode driver project for Windows Phone


The current releases of the Windows Driver Kit (WDK) and Windows Phone Driver Kit (WPDK) require the use of Visual Studio 2013. Together they provide built-in support for creating a new kernel-mode driver project that uses the Kernel-Mode Driver Framework (KMDF).

The following section walks through the process of creating a KMDF driver using the WDK, WPDK, and Visual Studio.

  1. Start Visual Studio 2013.

  2. On the File menu, choose New > Project.

  3. In the New Project dialog box, in the left pane, locate and selectWDF.

  4. In the middle pane, select Kernel Mode Driver (KMDF) or Kernel Mode Driver, Empty (KMDF).

  5. Type a name for the new project, and optionally choose a different location for the project.

  6. Check Create directory for solution. Click OK.

  • Microsoft Visual Studio creates two projects and a solution. You can see the solution, the two projects, and the files that belong to each project in theSolution Explorer window, shown in the following screen shot. (If the Solution Explorer window is not visible, chooseSolution Explorer from the View menu.) The solution contains a driver project and a driver package project.

    1. To add header and source files to the project, in the Solution Explorer window, right-click the driver project and chooseAdd > New Item orAdd > Existing Item.

    2. After your project is created, go to the Project menu and clickProperties.

    3. In the left pane of the Property Pages dialog box, click on theConfiguration Properties section, and then click theConfiguration Manager… button.

    4. Set the active solution configuration to Win8.1 Debug or Win8.1 Release.

    5. In the Configuration Manager dialog box, under the Active Solution Platform: menu, select <New…>.

    6. In the New Solution Platform dialog box, select ARM underNew Platform andWin32 under Copy settings from.

    7. Click OK.

    8. On the General node of the Property Pages dialog box, setPlatform Toolset toWindowsKernelModeDriver8.1 and clickApply.

    9. On the Windows Phone node of the Property Pages dialog box, ensure thatTarget Windows Phone Version is set to8.1, setBuild for Windows Phone to Yes, and clickApply.

    10. To build your driver, choose Build Solution from the Build menu. Microsoft Visual Studio displays the build progress in the Output window, as shown in the following screen shot. (If the Output window is not visible, chooseOutput from theView menu.)

    11. To see the built driver, navigate to your build output directory. By default, this directory is under your project directory inARM\Win8.1Release orARM\Win8.1Debug depending on your configuration. You will notices that a number of other files are provided in the built driver package, such as an INF file and associated .pdb file.

    You can also build a driver project from the Developer Command Prompt for VS2013 using MSBUILD commands. For information about MSBUILD, refer toWalkthrough: Using MSBuild andMSBUILD Reference.

    Note

    If you build a driver project using MSBUILD from the Developer Command Prompt for VS2013 and you choose to override theTargetVersion project-level property on the command line, you must specifyWindowsV6.3 for the property value. Here is an example.

    msbuild.exe SampleDriver.vcxproj /p:targetversion=WindowsV6.3

    Next steps

    After you have successfully configured your driver project, follow these steps to develop the driver and add it to a phone image:

    • Implement the driver using APIs in the KMDF and the driver model for the hardware component your driver supports. For more information about the KMDF, see the list of suggested topics to read inDriver development for Windows Phone. For more information about the driver models for hardware components, seeHardware components.

    • Make any necessary updates to the INF file for the driver. For more information about INF files, seeINF files for Windows Phone drivers.

    • If the driver will be used in a pre-production environment, it must be test-signed using certificates provided in the Windows Phone kits. For more information, seeSign binaries and packages.

    • Build a package that contains the driver binaries, the INF file, and any other related files or settings for the driver. For more information, see the “Adding a driver component” section ofCreating packages.

    • Build the driver package into a phone image. For more information, see Building a phone image using ImgGen.cmd.

      Note

      In test scenarios, you can alternatively use IUTool to add your driver package to an existing image on a phone. For more information, seeUpdate packages on a phone and get package update logs andUpdate a KMDF device driver.

    In addition to the steps listed above, you may need to also configure ACPI entries for your driver if it has required ACPI entries. For more information, seeACPI in Windows Phone.

创建Windows Phone内核模式驱动相关推荐

  1. 无法添加内核模式驱动的打印机

    症状描述 添加共享打印机时出现错误提示:"当前打印机驱动程序与计算机上启用的某个策略不兼容",导致无法添加成功. 原因分析 因为内核模式可以访问系统底层的内存,因此写得不好的内核模 ...

  2. NT内核和驱动开发的基础知识-笔记

    这是我在学习NT内核和驱动开发的基础知识时记录的一些笔记,不是连续的教程,欢迎指正错误的地方 ----------------------------------------------------- ...

  3. windows用户模式与内核模式

    对于Windows操作系统的编程一般来说已经涉及到了较深的领域,针对该问题提出几家之言,均为转载: 一. 为了防止用户程序访问并篡改操作系统的关键部分,Windows使用了2种处理器存取模式(事实上W ...

  4. 理解Windows内核模式与用户模式(新)

    版权声明:本文为博主原创文章,未经博主允许不得转载.  1.基础 运行 Windows 的计算机中的处理器有两个不同模式:"用户模式"和"内核模式".根据处 ...

  5. 理解Windows内核模式与用户模式

    内核层次架构 windows程序运行分为内核模式和用户模式,内核模式可以访问所有的内存地址空间, 并且可以访问所有的CPU指令.一般程序运行在用户模式, 通过系统调用切换到内核模式执行系统功能,Win ...

  6. Windows无法安装“某某某”内核模式打印驱动程序。若要获取与您运行的Windows版本相兼容的驱动程序,请与制造商联系。

    提示这个,先不要慌,小编教您设置一下电脑,再重新安装驱动,应该就可以了,我亲测是可以的 按win+R,调出运行框,输入gpedit.msc,打开本地计算机策略 然后,选择"计算机配置---- ...

  7. linux 驱动 内核模式,Linux内核模块和驱动的编写

    Linux内核是一个整体是结构,因此向内核添加任何东西,或者删除某些功能,都十分困难.为了解决这个问题引入了内核机制.从而可以动态的想内核中添加或者删除模块. 模块不被编译在内核中,因而控制了内核的大 ...

  8. 深入解析windows XP/2003:内核模式和用户模式

    为了避免windows应用程序访问和修改关键的操作系统数据,windows使用了2种处理器访问模式(即使windows在底层处理器支持多于2种以上的模式):用户模式和内核模式. 为什么windows只 ...

  9. Windows x64内核学习笔记(二)—— IA-32e模式

    Windows x64内核学习笔记(二)-- IA-32e模式 IA-32e模式 模式检测 强制平坦段 任务切换 中断门描述符 FS / GS 模式切换 32位程序进内核 64位程序进内核 实验:模式 ...

最新文章

  1. Docker安装gogs git仓库
  2. Java Web开发技术详解~MIME类型
  3. html中选择日期怎么实现,JavaScript+HTML5实现的日期比较功能示例
  4. PCB Genesis脚本 C#调用Javascript
  5. 【JOURNAL】Greeting via Connexion on Air in Lufthansa并一些祝福
  6. (2)、PHP Win10 本地配置RabbitMq
  7. Matlab训练BP神经网络的一般步骤
  8. 2021/12/5 XSS跨站原理及攻击手法
  9. JAVA字符串排序去重
  10. 我也来开发2048之终极奥义
  11. 近几年美国人口数据matlab,2010-2019年美国人口数量及人口性别、年龄、城乡结构分析...
  12. [RK3568 Android11] 开发之强制APP横屏或者竖屏显示
  13. 输出今天日期,以yyyy-mm-dd方式输出
  14. 550+超强动态文字动画AE模板(标题,字幕,标注,对话)等视频制作元素
  15. 曾经的大学德育论文,致敬天津理工大学
  16. ruoyi-vue Nginx配置二级域名
  17. 微信群发消息怎么发?微信群发消息只需要4步?
  18. 阿里云购买服务器、域名
  19. 如何解决Chrome禁止发送不安全的内网网络请求[origin ‘http://xxx.xxx.com:xxxx‘ has been blocked by CORS policy:...}
  20. B. Vanya and Lanterns

热门文章

  1. 城市路边停车收费系统/停车收费管理系统
  2. 传奇服务器开区修改,怎么修改传奇登陆器开区时间提前?
  3. 电脑回收站里不小心清理删除的文件怎么恢复?
  4. 渗透学习-SQL注入篇-基础知识的学习(持续更新中)
  5. Gartner ABI报告技术解读:2021 BI 与数据分析魔力象限
  6. Win10 电脑能够连接手机热点,但是不能上网。windows热点服务无法自动开启。
  7. 基于SSM+Shiro+Redis+Layui的后台管理系统
  8. django实训报告
  9. 句法分析(PCFG,Transition-based parsing)
  10. Makefile3、书写规则(文件搜寻、伪目标、多目标、静态模式、自动生成依赖性)