Quantcast
Channel: MSDN Blogs
Viewing all articles
Browse latest Browse all 29128

INF ファイルが Universal かどうか検証する方法

$
0
0

今回は、INF ファイルが Universal かどうか検証する方法として、InfVerif.exe を使う方法をご案内します。

 

Universal INF についてご存じない方や具体的な条件について確認したい方は、以下をご参照ください。

 

Using a Universal INF File

https://docs.microsoft.com/en-us/windows-hardware/drivers/install/using-a-universal-inf-file

 

InfVerif.exe は、WDK 10 がインストールされている環境の c:Program Files(x86)Windows Kits10tools<arch> (<arch> x86 x64) フォルダにあります。

 

以下のドキュメントの通り、/u オプションで Universal かどうかを検証できます。実行時には /v オプションも併せてつけることで、エラーや警告がある時の詳細が確認できます。

 

Running InfVerif from the command line

https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/running-infverif-from-the-command-line

 

/u

       Reports errors if INF is not Universal.

 

/v

       Display verbose file logging details.

 

つまり、「infverif.exe /v /u <infファイルへのパス>」 と実行します。

 

例として、Universal Driverの概念がなかったWDK 7.1 のサンプルを使って実行してみましょう。

(C:WinDDK7600.16385.1srcgeneraltoasterkmdffuncfeatured kmdf フォルダを C:Blogtoaster にコピーして、WDK 7.1 Win7 x86 checked build でビルドした wdffeatured.inf を使っています。)

 

C:Program Files (x86)Windows
Kits10Toolsx86>infverif.exe /v /u
c:Blogtoasterkmdffuncfeaturedobjchk_win7_x86i386wdffeatured.inf


Running in Verbose


Running Universal INF check


Running in Console output mode


 


Checking c:Blogtoasterkmdffuncfeaturedobjchk_win7_x86i386wdffeatured.inf


ERROR(1204) in c:Blogtoasterkmdffuncfeaturedobjchk_win7_x86i386wdffeatured.inf, line 20: Provider cannot be "Microsoft", must be organization who authored INF.


ERROR(1209) in c:Blogtoasterkmdffuncfeaturedobjchk_win7_x86i386wdffeatured.inf, line 25: Section [destinationdirs] is defined multiple times.


ERROR(1308) in c:Blogtoasterkmdffuncfeaturedobjchk_win7_x86i386wdffeatured.inf, line 34: Found legacy AddReg operation defining class installers (Installer32).


WARNING(2223) in c:Blogtoasterkmdffuncfeaturedobjchk_win7_x86i386wdffeatured.inf, line 53: Section [Standard] should have '.NTx86' decoration.


ERROR(1209) in c:Blogtoasterkmdffuncfeaturedobjchk_win7_x86i386wdffeatured.inf, line 91: Section [sourcedisksfiles] is defined multiple times.


 


INF is NOT VALID:  0000065B

 

エラーや警告のコード、該当する行番号、修正すべき内容が確認できます。

 

InfVerif.exeのエラーや警告のコードは、以下のように、値の範囲ごとに役割があります。

 

1200 ~ 1299 : INFファイルの構文エラー

1300 ~ 1309 : Universal INFではないことを示すエラー

2000 ~ 2999 : インストール時に問題となる可能性があることを示す警告

 

そのため、上記の例では、1300 番台のエラーコードがあるため、Universal に対応していないと言えます。

 

WDK 10 の同じサンプルでは、以下のように Universal 対応しているので、ご安心ください。

 



C:Program Files (x86)Windows Kits10Toolsx86>infverif.exe /v /u c:BlogtoastDrvkmdffuncfeaturedDebugwdffeatured.inf


Running in Verbose


Running Universal INF check


Running in Console output mode


 


Checking c:BlogtoastDrvkmdffuncfeaturedDebugwdffeatured.inf


INF is valid

 

 

エラーや警告の主なコードの説明は、以下に記載がありますのでご参照ください。

 

INF Validation Errors and Warnings

https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/inf-validation-errors-and-warnings

 

 

<ご注意>

既知の問題として、誠に恐れ入りますが、WDK 10 1607 (14393.1884Anniversary Update) infverif は動作せず、必ず使用法が表示されるという事象があります。このバージョン以外のWDK 10でご確認ください。

 

InfVerif tool not working with windows 10 and WDK 10

https://social.msdn.microsoft.com/Forums/en-US/90cb9b98-c53c-4203-8f4e-e903f0419998/infverif-tool-not-working-with-windows-10-and-wdk-10?forum=wdk

 

 

<参考>

InfVerif

https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/infverif

 

 

以上の内容がお役に立てば幸いです。

 

WDKサポートチーム 津田


Viewing all articles
Browse latest Browse all 29128

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>