windows-nt/Source/XPSP1/NT/base/wmi/cdmprov/cdmprov.htm
2020-09-26 16:20:57 +08:00

206 lines
9.9 KiB
HTML

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./cdmprov_files/filelist.xml">
<title>WMIFilt</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-format:other;
mso-font-pitch:variable;
mso-font-signature:3 0 0 0 1 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{margin-right:0in;
mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:465586843;
mso-list-type:hybrid;
mso-list-template-ids:-1321168666 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:Verdana'>CDMProv<o:p></o:p></span></h2>
<p><span style='font-size:10.0pt;font-family:Arial;color:red'>[This is
preliminary documentation and subject to change.]</span><span style='font-size:
10.0pt;font-family:Verdana'><o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This is a sample WMI user
mode provider that allows device drivers to expose diagnostic tests by means of
the CIM Common Diagnostic Model (CDM). The driver writer will implement its
diagnostics within the kernel mode device driver with WMI instrumentation and
then write Managed Object Format for the CDM classes that refer to the WDM
instrumentation. This sample, the CDM Provider, will expose the CDM classes on
behalf of the device driver.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Follow these steps to
build and run the CDM Provider with the sample code.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Change
the name of the provider from CdmProv to your own unique name and guid in
cdmprov.mof.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>On
your development machine run <b><i>build &#8211;cz</i></b> in the directory to create
CDMProv.DLL<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>On
your target machine run <b><i>mofcomp cdmprov.mof</i></b> to include the CDM
Provider specific information in the schema<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Verdana'>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>On
your target machine run <b><i>regsvr32 cdmprov.dll</i></b> to cause the
provider to self register.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RESOURCES<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Please see the DDK
DiagFilt sample and the cdmwdm.doc reference information.<span
style="mso-spacerun: yes">&nbsp; </span>Also see MSDN for more information on
WMI user mode providers.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Description<o:p></o:p></u></pre><pre>cdmprov.htm<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp; </span>This file</pre><pre>cdmprov.mof<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp; </span>CDM Provider specific MOF</pre><pre>cdmprov.rc<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Resource Script file for CDM Provider</pre><pre>cdmwdm.htm<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Reference information for using CDM Provider</pre><pre>cimmap.cpp<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>WDM to CIM mapping routines</pre><pre>cimmap.h<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>WDM to CIM mapping routines</pre><pre>classfac.cpp<span
style='mso-tab-count:1'>&nbsp;&nbsp; </span>Provider class factory routines</pre><pre>classprov.cpp<span
style='mso-tab-count:1'>&nbsp; </span>Provider implementation routines</pre><pre>classprov.def<span
style='mso-tab-count:1'>&nbsp; </span>Module definition file for provider</pre><pre>debug.cpp<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Debugging routines</pre><pre>debug.h<span
style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Debugging routines</pre><pre>maindll.cpp<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp; </span>Main dll housing for provider</pre><pre>makefile<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Build makefile</pre><pre>reload.cpp<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>PnP device start restart routines</pre><pre>reload.h<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>PnP device start restart routines</pre><pre>sample.h<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Provider implementation routines</pre><pre>sources<span
style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Build sources</pre><pre>testinfo.cpp<span
style='mso-tab-count:1'>&nbsp;&nbsp; </span>WDM interface routines</pre><pre>testinfo.h<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>WDM interface routines</pre><pre>wbemmisc.cpp<span
style='mso-tab-count:1'>&nbsp;&nbsp; </span>Misc routines to interact with WMI</pre><pre>wbemmisc.h<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Misc routines to interact with WMI</pre>
<p style='margin:0in;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Courier New"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
<p align=center style='margin:0in;margin-bottom:.0001pt;text-align:center;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:"Courier New"'><a
href="#top"><span style='font-family:Verdana'>Top of page</span></a></span><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:"Courier New";
mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
<pre><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></pre>
<table border=0 cellspacing=0 cellpadding=0 width=624 style='width:6.5in;
mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
</td>
</tr>
</table>
<pre><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></pre><pre><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></pre>
<p style='margin:0in;margin-bottom:.0001pt;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif";mso-fareast-font-family:
"Courier New";mso-bidi-font-family:"Courier New"'>&copy; 2000 Microsoft Corporation</span><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:"Courier New";
mso-bidi-font-family:"Courier New"'> <o:p></o:p></span></p>
</div>
</body>
</html>