Bewerken

Delen via


Wmimofck task

The Windows Driver Kit (WDK) provides the Wmimofck task so you can run the wmimofck.exe tool when you build a driver using MSBuild.

For information about using the Wmimofck tool, see Using Wmimofck.exe.

MSBuild uses the Wmimofck item to send the parameters for the Wmimofck task. The item metadata for wmimofck is accessed using the Wmimofck item in project files.

The following example shows how to edit metadata in the .vcxproj file.

<ItemGroup>
    <Wmimofck Include="a.bmf">
      <GenerateStructureDefinitionsForDatablocks>true</GenerateStructureDefinitionsForDatablocks>
    </Wmimofck>
    <Wmimofck Include="b.bmf">
      <HeaderOutputFile>b.h</HeaderOutputFile>
    </Wmimofck>
</ItemGroup>

The following example shows how you run Wmimofck.exe in a Command Prompt window:

Wmimofck.exe -u a.bmf
Wmimofck.exe –h"b.h" b.bmf

The example above invokes wmimofck.exe on both a.bmf and b.bmf, but with different sets of parameters and with different metadata. Therefore, the switches will also be different for these inputs. In other words, you can call each input with its own set of metadata.

Wmimofck Task Parameter Item Metadata Tool Switch
Source

Required ITaskItem parameter. Specifies the input source file.

@(Wmimofck)
GenerateStructureDefinitionsForDatablocks

Optional Boolean parameter. Wmimofck generates member definitions for every property that has a fixed size, including optional properties that specify a MaxLen qualifier.

%(Wmimofck.GenerateStructureDefinitionsForDatablocks) -u
GenerateStructureDefinitionsForMethodParameters

Optional Boolean parameter. The header file includes structure definitions for the input and output of each WMI method.

%(Wmimofck.GenerateStructureDefinitionsForMethodParameters) -m
HeaderOutputFile

Optional string parameter. Generates a C language header file (.h file) that can then be used to keep the header file in sync with MOF definitions.

%(Wmimofck.HeaderOutputFile) -hFilename
HexdumpOutputFile

Optional string parameter. Generates a Hex version of .bmf data that can be included in the driver source for supplying dynamic MOF data at run time.

%(Wmimofck.HexdumpOutputFile) -xFilename
HTMLUIOutputDirectory

If this is set to true, it generates the -w switch.

%(Wmimofck.HTMLUIOutputDirectory)
HTMLOutputDirectory

Optional string parameter. Specifies the directory for the HTML files that Wmimofck generates.

%(Wmimofck.HTMLOutputDirectory) -wDirectory
MFLFile

Optional string parameter. Specifies a file containing amended classes.

%(Wmimofck.MFLFile) -zMFLFile
MinimalRebuildFromTracking

Optional Boolean parameter. If true, a tracked incremental build is performed; if false, a rebuild is performed.

%(Wmimofck.MinimalRebuildFromTracking)
MOFFile

Optional string parameter. Specifies a file containing language-independent WMI class declarations.

%(Wmimofck.MOFFile) -yMOFFile
SourceOutputFile

Optional string parameter. Generates a C language source file which contains stubs for WMI driver code.

%(Wmimofck.SourceOutputFile) -cFilename
TLogReadFiles

Optional string parameter.

@(WmimofckTLogReadFiles)
TLogWriteFiles

Optional string parameter.

@(WmimofckTLogWriteFiles)
ToolExe

Optional string parameter.

$(WmimofckToolExe)
ToolPath

Optional string parameter. Specifies the full path to the folder where the tool is located.

$(WmimofckToolPath)
TrackerLogDirectory

Optional string parameter. Specifies the Log directory for tracker to write tlogs.

%(Wmimofck.TrackerLogDirectory)
TrackFileAccess

Optional Boolean parameter. If true, tracks file access patterns for this task.

$(TrackFileAccess)
ToolArchitecture

Optional string parameter.

$(WmimofckToolArchitecture)
TrackerFrameworkPath

Optional string parameter.

$(WmimofckTrackerFrameworkPath)
TrackerSdkPath

Optional string parameter.

$(WmimofckTrackerSdkPath)
VBScriptTestOutputFile

Optional string parameter. A VBScript program is created that will query all data blocks and properties specified in the MOF file.

%(Wmimofck.VBScriptTestOutputFile) -tFilename
AdditionalOptions

Optional string parameter.

%(Wmimofck.AdditionalOptions)

Using Wmimofck.exe