summaryrefslogtreecommitdiff
path: root/wmi
diff options
context:
space:
mode:
authorBarry Golden <[email protected]>2019-09-26 09:04:22 -0700
committerGitHub <[email protected]>2019-09-26 09:04:22 -0700
commitf7eb738097908a1e32ca2a07a605bba0e85ccb95 (patch)
tree9cc298db580c5ae737f6e3f25a09336ce6c99694 /wmi
parentd2a01860208bcce9f4777d54bec3c59c4c02e969 (diff)
* Update README.md * Update README.md
Diffstat (limited to 'wmi')
-rw-r--r--wmi/wmiacpi/README.md19
-rw-r--r--wmi/wmisamp/README.md21
2 files changed, 14 insertions, 26 deletions
diff --git a/wmi/wmiacpi/README.md b/wmi/wmiacpi/README.md
index ae6292db..0afc710f 100644
--- a/wmi/wmiacpi/README.md
+++ b/wmi/wmiacpi/README.md
@@ -8,16 +8,6 @@ products:
- windows-wdk
---
-
-<!---
- name: WMIACPI Sample
- platform: WDM
- language: cpp
- category: WMI ACPI
- description: Contains ACPI BIOS and WMI sample code that enables instrumentation of the ACPI BIOS from within ACPI Source Language (ASL) code.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618006
---->
-
# WMI ACPI Sample
The WMIACPI sample contains ACPI BIOS and Microsoft Windows Management Instrumentation (WMI) sample code that enables instrumentation of the ACPI BIOS from within ACPI Source Language (ASL) code. ASL code can expose data blocks, methods, and events through WMI by leveraging the ACPI-WMI mapping driver (Wmiacpi.sys).
@@ -28,12 +18,12 @@ The WMIACPI sample contains files which allow an ACPI BIOS developer to add inst
The following table lists the files included in the sample and their function:
-| File | Description|
+| File | Description |
| --- | --- |
| Device.asl | ASL code that can be included in the ACPI bios that exposes a set of packages, strings, data, methods and events. |
| Acpimof.mof | Managed object format (MOF) file that contains a description of the data blocks, methods, and events that are exposed. This description is required so that WMI can access the data blocks, methods, and events. |
| Acpimof.rc<br>Acpimof.def | Files that are required to build Acpimof.dll, which is a resource-only DLL. |
-| Wmi-Acpi.htm | The *Windows Instrumentation: WMI and ACPI* whitepaper. |
+| Wmi-Acpi.htm | The *Windows Instrumentation: WMI and ACPI* white paper. |
| acpimov.vcxproj | Visual Studio project file for the sample. |
| acpimof.sln | Visual Studio solution file for the sample. |
@@ -42,8 +32,11 @@ The following table lists the files included in the sample and their function:
To add the sample code to your ACPI bios and access through WMI:
1. Include the contents of *Device.asl* to your ASL source and rebuild the DSDT. Update the operating system with the new DSDT through reflashing.
+
1. Build *Acpimof.dll* in the WMIACPI directory. *Acpimof.dll* is a resource-only DLL that contains the compiled MOF in a form that WMI can import into its schema.
+
1. Copy *Acpimof.dll* to %windir%\\system32 and add a value named "MofImagePath" under the HKEY\_LOCAL\_MACHINE\\CurrentControlSet\\Services\\WmiAcpi key. The contents of the value should be a path to the *Acpimof.dll* file.
+
1. Restart your computer. When Plug and Play (PnP) recognizes the new device with a pnpid of pnp0c14, it will install *Wmiacpi.sys* automatically and make the MOF resource in Acpimof.dll available to the WMI schema.
-Note that you do not need an INF file because Windows supplies an INF for the ACPI-WMI mapping driver device as part of the operating system. \ No newline at end of file
+Note that you do not need an INF file because Windows supplies an INF for the ACPI-WMI mapping driver device as part of the operating system.
diff --git a/wmi/wmisamp/README.md b/wmi/wmisamp/README.md
index c305be3e..ae810493 100644
--- a/wmi/wmisamp/README.md
+++ b/wmi/wmisamp/README.md
@@ -8,16 +8,6 @@ products:
- windows-wdk
---
-
-<!---
- name: WmiSamp WMI Provider
- platform: KMDF
- language: cpp
- category: WMI
- description: Demonstrates how to register WMI providers in KMDF, create provider instances, and handle WMI queries sent to a device.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618007
---->
-
# Sample KMDF Driver Implementing a WMI Data Provider
WmiSamp WMI Provider is a sample KMDF driver that implements a WMI data provider.
@@ -32,9 +22,10 @@ The **Firefly**, **PCIDRV**, and **Toaster** sample drivers also implement WMI d
## Installation
-In Visual Studio, you can press F5 to build the sample and then deploy it to a target machine. For more information, see [Deploying a Driver to a Test Computer](http://msdn.microsoft.com/en-us/library/windows/hardware/hh454834).
+In Visual Studio, you can press F5 to build the sample and then deploy it to a target machine. For more information, see [Deploying a Driver to a Test Computer](https://docs.microsoft.com/windows-hardware/drivers/develop/deploying-a-driver-to-a-test-computer).
-**Note** You can obtain redistributable framework updates by downloading the *wdfcoinstaller.msi* package from [WDK 8 Redistributable Components](http://go.microsoft.com/fwlink/p/?LinkID=226396). This package performs a silent install into the directory of your Windows Driver Kit (WDK) installation. You will see no confirmation that the installation has completed. You can verify that the redistributables have been installed on top of the WDK by ensuring there is a redist\\wdf directory under the root directory of the WDK, %ProgramFiles(x86)%\\Windows Kits\\8.0.
+> [!NOTE]
+> You can obtain redistributable framework updates by downloading the *wdfcoinstaller.msi* package from [WDK 8 Redistributable Components](https://go.microsoft.com/fwlink/p/?LinkID=253170). This package performs a silent install into the directory of your Windows Driver Kit (WDK) installation. You will see no confirmation that the installation has completed. You can verify that the redistributables have been installed on top of the WDK by ensuring there is a redist\\wdf directory under the root directory of the WDK, %ProgramFiles(x86)%\\Windows Kits\\8.0.
## Testing
@@ -45,8 +36,12 @@ To test the WmiSamp driver, run the generated WmiSamp.vbs script file. This will
WmiMofCk validates that the classes, properties, methods and events specified in a binary mof file (.bmf) are valid for use with WMI. It also generates useful output files needed to build and test the WMI data provider.
- If the -h parameter is specified, a C language header file is created that defines the GUIDs, data structures, and method indices specified in the MOF file.
+
- If the -t parameter is specified, a VBScript applet is created that will query all data blocks and properties specified in the .mof file. This can be useful for testing WMI data providers.
+
- If the -x parameter is specified, a text file is created that contains the text representation of the binary .mof data. This can be included in the source of the driver if the driver supports reporting the binary .mof via a WMI query rather than a resource on the driver image file.
+
- Usage: wmimofck -h\<C Header output file\> -x\<Hexdump output file\> -t\<VBScript test output file\> \<binary mof input file\>
-**Note** A byproduct of compiling the .mof file is a .vbs file. This is a VBScript file that is run from the command line on the target machine running the new device driver. It will cause WMI to query all data blocks and properties, and put the results into a .log file. This can be very useful for testing WMI support in your driver. For more sophisticated testing, the VBScript can be extended by hand. \ No newline at end of file
+> [!NOTE]
+> A byproduct of compiling the .mof file is a .vbs file. This is a VBScript file that is run from the command line on the target machine running the new device driver. It will cause WMI to query all data blocks and properties, and put the results into a .log file. This can be very useful for testing WMI support in your driver. For more sophisticated testing, the VBScript can be extended by hand.