株式会社デバイスドライバーズ
Atomu Hidaka
Windows ドライバー開発 虎の巻
- 直ぐに使える開発環境 を構築 その1 –
日本を Smart
に!
プ
ロ
が
教
え
る
Windows ドライバー開発
初心者から専門家まで役に立つ
環境構築:定番作業
ドキュメント・サンプル活用
コーディング ( AI 化・自動化)
テスト・署名申請
その1
今回の内容
• Windows ドライバー開発に必要なもの
• 開発用環境
• インストール手順
• ドライバービルド
• 環境の動作検証
• 知られざる 裏技
ドライバー開発に必要なもの
• 正常動作する複数台の開発専用 物理 PC
• 開発ホスト用
• 開発ターゲット用
• 開発ツール
• Visual Studio 2022
• Windows SDK*
• Windows WDK
• テスト用アプリケーション
• 開発者が作成
基本:最新のものだけをインストール
誤り:開発時のバージョンを利用
開発用環境
• Dell, HP デスクトップ PC, Hyper-V は適宜
• 不可:ノート型 , Tablet, ミニ PC, 他の仮想マシン環境
• 自作 , 中古 , 改造 PC は OK, 追加アプリ入れない
開発・評価環境
ハードウェアが重要
HLK (Windows Hardware Lab Kit 要
件)
開発環境はゲートウェイで分離
HLK Pass は、周辺機器ハードウェア機種次第
ドライバー署名
• ドライバー署名は証明書
• 証明書:ハンコ(毎年更新)
• 署名:印影(有効な証明書で作成)
• 開発したドライバーを配布する場合は、
EV 証明書調達と Microsoft パートナーアカウント登録は必須
• 裏技 開発時は無し
• 究極の裏技 は後で…
開発環境構築インストール手順
正常動作している Windows 11 or Windows 10
1. Visual Studio + Option
(+ SDK) 裏技 同時インストール
2. WDK
WDK
WDK のページ
https://learn.microsoft.com/ja-jp/windows-hardware/drivers/download-the-wdk
最初に選択・必須項目
Guidance for beginners and experts on how to set up a Windows driver development environment
64 最新
検索結果項目 追加
これだけ不要
Windows 11 SDK (10.0.26100.0)
Windows Driver Kit 追加
10.0.26100.0 の番号は重要
Windows 11 24H2 識別番号
SDK バージョン= WDK バージョン
Git for Windows 追加 オスス
メ!
WDK インストール
• 入手方法
WDK のページからダウンロード
従来の VSIX は Visual Studio オプション化
WDK
ドライバービルド
テンプレートを利用して開発
テンプレート試用
• インストールした環境の動作検証
• UMDF2 テンプレート
プロジェクト作成
このサンプルの場合
• プロジェクト名 : UMDF2Driver1
• 場所 : C:VS17
Visual Studio プロパティ設定
UMDF2Driver1 のプロパティ
Inf2Cat Use Local Time
→ → はい
Visual Studio プロパティ設定
UMDF2Driver1 のプロパティ
Driver Signing Sign Mode Off
→ →
ビルド
環境の動作検証
- 開発時署名の無効化
- WPP TraceView 活用
開発時署名無効化の裏技
• 一般的には
• Shift キー再起動 → ドライバー署名の強制を無効
• 究極の裏技
• セキュアブート無効化
• bcdedit /copy {current} /d "Windows 11 Debug"
• msconfig で Debug エントリー設定後 再起動
• bcdedit /set {current} testsigning on
msconfig 画面設定例
TraceView 解説
• WPP ソフトウェア トレース
• WPP: Windows software trace preprocessor
- ETW (Event Tracing for Windows) 利用
• システム負荷が少ないログ機能
• 使い易い豊富なマクロ
• WPP 拡張書式指定文字列とは
https://learn.microsoft.com/ja-jp/windows-hardware/drivers/devtest/what-are-the-wpp-extended-
format-specification-strings-
使い易い TraceView マクロ wpp プリプロセッサ
TraceView 動作確認
• デバッグモードで起動
• テスト準備
• テスト用ディレクトリ作成
• traceview.exe, devcon.exe コピー
C:Program Files (x86)Windows Kits10bin10.0.26100.0x64
• inf, dll, cat, PDB コピー
• 管理者権限 TraceView 起動 と設定
• ドライバー実行(インストール)
• devcon install UMDF2Driver1.inf "RootUMDF2Driver1"
ドライバー インストール
> devcon install UMDF2Driver1.inf "Root
UMDF2Driver1"
TraceView 表示例
WPP 拡張書式指定文字列
まとめ
初心者から専門家まで役に立つ Windows ドライバー開
発
その1:環境構築(定番作業)
• Windows ドライバー開発に必要なもの
• 開発用環境
• インストール手順
• ドライバービルド
• 環境の動作検証
• 知られざる 裏技
ありがとうございました。
チャンネル登録、いいね ボタン、よろしくお願いします
日本を Smart に!資料 https://www.slideshare.net/
NETMF/
GitHub
https://github.com/ahidaka/

More Related Content

PPTX
What the end of support of Windows 10 will mean?
PPTX
Explains how to use USBView, which is useful for analyzing Windows USB problems
PPTX
Explaining how to use MBR2GPT in preparation for the end of Windows 10 support
PPTX
The requirements for installing Windows 11 on older PCs have been relaxed.
PPTX
EnOcean-iot, Generative-AI, and RAG for LLM
PPTX
Introduction to the Thunder Cloud Project Technical Committee
PPTX
WSL for IoT, Microcomputer, and Yocto Project
PPTX
Tips and tricks for WSL users: Two easy and reliable ways to get started with...
What the end of support of Windows 10 will mean?
Explains how to use USBView, which is useful for analyzing Windows USB problems
Explaining how to use MBR2GPT in preparation for the end of Windows 10 support
The requirements for installing Windows 11 on older PCs have been relaxed.
EnOcean-iot, Generative-AI, and RAG for LLM
Introduction to the Thunder Cloud Project Technical Committee
WSL for IoT, Microcomputer, and Yocto Project
Tips and tricks for WSL users: Two easy and reliable ways to get started with...

More from Atomu Hidaka (20)

PPTX
Customize Chat-GPT using Azure OpenAI Studio
PPTX
Useful Tips and Tricks for Windows 11 TPM Part 2
PPTX
How to use EnOcean Gateway with Azure OpenAI
PPTX
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
PPTX
Tips and Tricks for developing Windows APO drivers
PPTX
Useful Tips and Tricks for Windows 11 TPM
PPTX
Develop Windows 11 drivers with GitHub Copilot's AI capabilities
PDF
Windows 11 22H2 Feature-Update, Copilot, and Tips
PPTX
Windows 11 information that can be used at the development site
PPTX
ChatGPT solution with EnOcean Gateway
PPTX
Windows ChatGPT Bing AI
PPTX
Windows ChatGPT Bing AI.pptx
PPTX
Music Tech Community LT, Introducing Windows APO
PPTX
LLILUM and TinyCLR OS
PPTX
Introducing new features of EnOcean Gateway
PPTX
Windows 11 Overview
PPTX
IoT implemented in Windows 11.pptx
PPTX
How to use Windows 11 effectively.pptx
PPTX
Recent my activities in 2022 1Q.pptx
PPTX
My highlight topics_in_2021
Customize Chat-GPT using Azure OpenAI Studio
Useful Tips and Tricks for Windows 11 TPM Part 2
How to use EnOcean Gateway with Azure OpenAI
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
Tips and Tricks for developing Windows APO drivers
Useful Tips and Tricks for Windows 11 TPM
Develop Windows 11 drivers with GitHub Copilot's AI capabilities
Windows 11 22H2 Feature-Update, Copilot, and Tips
Windows 11 information that can be used at the development site
ChatGPT solution with EnOcean Gateway
Windows ChatGPT Bing AI
Windows ChatGPT Bing AI.pptx
Music Tech Community LT, Introducing Windows APO
LLILUM and TinyCLR OS
Introducing new features of EnOcean Gateway
Windows 11 Overview
IoT implemented in Windows 11.pptx
How to use Windows 11 effectively.pptx
Recent my activities in 2022 1Q.pptx
My highlight topics_in_2021
Ad

Guidance for beginners and experts on how to set up a Windows driver development environment