mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
670 lines
34 KiB
670 lines
34 KiB
<!- Copyright (c) 1999-2001 Microsoft Corporation, All Rights Reserved ->
|
|
<!doctype html public "-//W3C//DTD HTML 4.0 Draft//EN">
|
|
<html xmlns:v="urn:schemas-microsoft-com:vml"
|
|
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=windows-1251">
|
|
<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="./VCSamples_files/filelist.xml">
|
|
<title>WMI SDK Samples Readme</title>
|
|
<!--[if gte mso 9]><xml>
|
|
<o:DocumentProperties>
|
|
<o:Author>Michael Maston</o:Author>
|
|
<o:Template>Normal</o:Template>
|
|
<o:LastAuthor>Michael Maston</o:LastAuthor>
|
|
<o:Revision>17</o:Revision>
|
|
<o:TotalTime>1692</o:TotalTime>
|
|
<o:Created>1999-01-28T19:11:00Z</o:Created>
|
|
<o:LastSaved>2001-01-20T21:20:00Z</o:LastSaved>
|
|
<o:Pages>2</o:Pages>
|
|
<o:Words>868</o:Words>
|
|
<o:Characters>4950</o:Characters>
|
|
<o:Company>Microsoft</o:Company>
|
|
<o:Lines>41</o:Lines>
|
|
<o:Paragraphs>9</o:Paragraphs>
|
|
<o:CharactersWithSpaces>6078</o:CharactersWithSpaces>
|
|
<o:Version>9.2720</o:Version>
|
|
</o:DocumentProperties>
|
|
</xml><![endif]--><!--[if gte mso 9]><xml>
|
|
<w:WordDocument>
|
|
<w:Zoom>103</w:Zoom>
|
|
</w:WordDocument>
|
|
</xml><![endif]-->
|
|
<style>
|
|
<!--
|
|
/* Font Definitions */
|
|
@font-face
|
|
{font-family:"MS Mincho";
|
|
panose-1:2 2 6 9 4 2 5 8 3 4;
|
|
mso-font-alt:"MS Mincho";
|
|
mso-font-charset:128;
|
|
mso-generic-font-family:modern;
|
|
mso-font-pitch:fixed;
|
|
mso-font-signature:-1610612033 1757936891 16 0 131231 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;}
|
|
@font-face
|
|
{font-family:"\@MS Mincho";
|
|
panose-1:2 2 6 9 4 2 5 8 3 4;
|
|
mso-font-charset:128;
|
|
mso-generic-font-family:modern;
|
|
mso-font-pitch:fixed;
|
|
mso-font-signature:-1610612033 1757936891 16 0 131231 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";
|
|
color:black;}
|
|
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.MsoPlainText, li.MsoPlainText, div.MsoPlainText
|
|
{margin:0in;
|
|
margin-bottom:.0001pt;
|
|
mso-pagination:widow-orphan;
|
|
font-size:10.0pt;
|
|
font-family:"Courier New";
|
|
mso-fareast-font-family:"Times New Roman";}
|
|
@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:1471289767;
|
|
mso-list-type:hybrid;
|
|
mso-list-template-ids:-1956236998 631828248 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
|
|
@list l0:level1
|
|
{mso-level-tab-stop:63.0pt;
|
|
mso-level-number-position:left;
|
|
margin-left:63.0pt;
|
|
text-indent:-45.0pt;}
|
|
ol
|
|
{margin-bottom:0in;}
|
|
ul
|
|
{margin-bottom:0in;}
|
|
-->
|
|
</style>
|
|
<!--[if gte mso 9]><xml>
|
|
<o:shapedefaults v:ext="edit" spidmax="1027"/>
|
|
</xml><![endif]--><!--[if gte mso 9]><xml>
|
|
<o:shapelayout v:ext="edit">
|
|
<o:idmap v:ext="edit" data="1"/>
|
|
</o:shapelayout></xml><![endif]-->
|
|
<meta name=MS-HAID content=VJsamples>
|
|
</head>
|
|
|
|
<body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
|
|
|
|
<div class=Section1>
|
|
|
|
<table border=0 cellpadding=0 width="100%" style='width:100.0%;mso-cellspacing:
|
|
1.5pt;mso-padding-alt:0in 0in 0in 0in'>
|
|
<tr>
|
|
<td width=160 style='width:120.0pt;background:#330099;padding:.75pt .75pt .75pt .75pt'>
|
|
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana;
|
|
color:white'> <nobr><b>Windows Management Instrumentation SDK Samples</b></span>
|
|
<o:p></o:p></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class=MsoPlainText><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>The samples contained within
|
|
this directory are intended to demonstrate the concepts of building Windows
|
|
Management Instrumentation (WMI) applications and providers using Microsoft
|
|
Visual C++.<span style="mso-spacerun: yes"> </span>Examples of property,
|
|
method, instance and event providers as well as consumer applications for
|
|
various types of provider information are included.<span style="mso-spacerun:
|
|
yes"> </span>In addition, a simple provider based on the WMI Provider
|
|
Framework is presented to streamline and simplify the process of building your
|
|
own provider.<o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>A list of the samples
|
|
and a brief description of their purpose is provided below.<span
|
|
style="mso-spacerun: yes"> </span><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'>Provider Samples<o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<table border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;
|
|
border:none;mso-border-alt:solid windowtext .5pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border:solid windowtext 1.5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>Sample Name<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border:solid windowtext 1.5pt;
|
|
border-left:none;mso-border-left-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>Description<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>ClassProv<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An example of a WMI
|
|
class provider.<span style="mso-spacerun: yes"> </span><o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>EventProvider<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An example of an
|
|
event provider.<span style="mso-spacerun: yes"> </span>The provider generates
|
|
periodic events, which can be collected by the TempConsumer client
|
|
application.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>FrameworkProv<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An example of an
|
|
instance provider built on the WMI Provider Framework.<span yes> </span>The
|
|
sample code supports enumeration, retrieval, put and delete.<span yes> </span><o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>HiPerfProvider<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An example of a
|
|
provider that uses the high performance API.<span style="mso-spacerun: yes">
|
|
</span>This provider can be used in conjunction with the HiPerfClient sample.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>InstProv<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An example of a basic
|
|
instance provider.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>MethProv<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An example of a basic
|
|
methods provider.<span style="mso-spacerun: yes"> </span>This provider can
|
|
be used in conjunction with the MethCli sample client application.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border:solid windowtext .5pt;
|
|
border-top:none;mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>PropProv<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An example of a basic
|
|
property provider.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'>Client Samples<o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<table border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;
|
|
border:none;mso-border-alt:solid windowtext .5pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border:solid windowtext 1.5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>Sample Name<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border:solid windowtext 1.5pt;
|
|
border-left:none;mso-border-left-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>Description<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>Client<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>An MFC-based sample client
|
|
that demonstrates many useful operations a typical WMI client application
|
|
might perform.<span style="mso-spacerun: yes"> </span>Concepts such as
|
|
connecting to CIMOM, retrieving instances of the Win32 provider classes,
|
|
creating new namespaces and user classes and adding temporary and permanent
|
|
event consumer are demonstrated.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>CmdLineConsumer<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>A simple event
|
|
consumer that looks for instance creation events.<span style="mso-spacerun:
|
|
yes"> </span>If an instance creation event is received, the sample launches
|
|
a user-specific application (Windows Notepad, by default).<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>CustomViews<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>This sample
|
|
demonstrates how to use the Custom View OCX’s controls used by the WMI SDK
|
|
applications to get custom views of information available via WMI.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>EventConsumer<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>The EventConsumer
|
|
sample is an example of an event consumer provider. <span
|
|
style="mso-spacerun: yes"> </span>This provider implements the
|
|
IWBEMEventConsumerProvider.<span style="mso-spacerun: yes"> </span>The
|
|
sample also includes the event consumer that is returned by the even consumer
|
|
provider.<span style="mso-spacerun: yes"> </span>The event consumer
|
|
demonstrates the implementation of the IWBEMUnboundObjectSink interface which
|
|
actually consumes WMI events.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>HiPerfClient<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>This sample
|
|
demonstrates a client that makes use of the WMI high performance API.<span
|
|
style="mso-spacerun: yes"> </span>This client should be used in conjunction
|
|
with the HiPerfProvider sample provider.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>MethCli<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>This sample demonstrates
|
|
a client for a method provider.<span style="mso-spacerun: yes"> </span>This
|
|
client can be used in conjunction with the MethProv sample provider.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>PingWbem<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>This sample
|
|
demonstrates the simplest WMI feature, connecting to the Windows Management
|
|
service (CIMOM).<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>SimpleClient<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>The SimpleClient
|
|
sample code is meant to accompany the tutorial article "Creating a WMI
|
|
Application in MFC".<span yes> <o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>TempConsumer<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>The TempConsumer
|
|
sample demonstrates a temporary asynchronous event consumer application.<span
|
|
yes> </span>TempConsumer consumes events produced by the provider in
|
|
the EventProvider WMI SDK sample.<span yes><o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>WbemDump<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>The WbemDump sample
|
|
application allows the user to dump the contents of the CIMOM database to the
|
|
console or a file.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'>Other Samples<o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-size:12.0pt;mso-bidi-font-size:10.0pt;
|
|
font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<table border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;
|
|
border:none;mso-border-alt:solid windowtext .5pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border:solid windowtext 1.5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>Sample Name<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border:solid windowtext 1.5pt;
|
|
border-left:none;mso-border-left-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>Description<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width=191 valign=top style='width:143.6pt;border-top:none;border-left:
|
|
solid windowtext .5pt;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>UtilLib<o:p></o:p></span></p>
|
|
</td>
|
|
<td width=399 valign=top style='width:299.2pt;border-top:none;border-left:
|
|
none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext .5pt;
|
|
mso-border-top-alt:solid windowtext 1.5pt;mso-border-left-alt:solid windowtext .5pt;
|
|
padding:0in 5.4pt 0in 5.4pt'>
|
|
<p class=MsoPlainText><span style='font-family:Verdana'>The UtilLib sample
|
|
library is a collection of useful routines used by some of the samples
|
|
applications and that can be used in general for building WMI applications.<o:p></o:p></span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class=MsoNormal style='tab-stops:list .5in'><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoNormal style='tab-stops:list .5in'><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoNormal><strong><span style='font-family:Verdana;font-weight:normal'>General
|
|
Notes<o:p></o:p></span></strong></p>
|
|
|
|
<p class=MsoNormal list .5in><strong><span style='font-family:Verdana;
|
|
font-weight:normal'> <o:p></o:p></span></strong></p>
|
|
|
|
<p class=MsoPlainText list .5in><span MS Mincho Times New Roman><span
|
|
style='font-family:Verdana'>Things to remember when you're building your own
|
|
WMI client applications and providers:<o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText list .5in><span MS Mincho Times New Roman><span
|
|
style='font-family:Verdana'> <o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt' l1 level1 lfo3 list .25in .5in><span
|
|
MS Mincho><![if !supportLists]><span style='font-family:Verdana'>1.<span
|
|
style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>If you want your
|
|
client to run on NT and non-DCOM versions of Windows 95, manually load the ole32.dll
|
|
and see if CoInitializeSecurity() exists. This routine won’t exist on Windows
|
|
95 installations that don’t have DCOM installed separately. If this routine
|
|
doesn't exist, the asynchronous routines in this sample won’t work because of
|
|
mismatched security level problems. The synchronous techniques will still work.<o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:-30.0pt' list .5in><span MS Mincho
|
|
Times New Roman><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt' l1 level1 lfo3 list .25in .5in><span
|
|
MS Mincho><![if !supportLists]><span style='font-family:Verdana'>2.<span
|
|
style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>If you don’t care
|
|
about non-DCOM versions of Windows 95, you can define<span yes> </span>_WIN32_DCOM
|
|
so that CoInitializeSecurity() is available for implicit linking. Don't use
|
|
_WIN32_WINNT to get this prototype since it won't compile under the Windows
|
|
95/98 operating systems.<o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:-30.0pt' list .5in><span MS Mincho
|
|
Times New Roman><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt' l1 level1 lfo3 list .25in .5in><span
|
|
MS Mincho><![if !supportLists]><span style='font-family:Verdana'>3.<span
|
|
style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>In any case, the
|
|
CoInitializeSecurity() call (in InitInstance()) is required to work around a
|
|
security problem when WMI trying to call a Sink object but won't identify
|
|
itself. The CoInitializeSecurity() call turns off the authentication
|
|
requirement. <o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:-30.0pt' list .5in><span MS Mincho
|
|
Times New Roman><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt' l1 level1 lfo3 list .25in .5in><span
|
|
MS Mincho><![if !supportLists]><span style='font-family:Verdana'>4.<span
|
|
style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>WMI interfaces are
|
|
defined in wbemcli.h and wbemprov.h found in the wbem\include directory.<span
|
|
yes> </span>You may #include both these files by including just wbemidl.h
|
|
located in the same directory.<o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:-30.0pt' list .5in><span MS Mincho
|
|
Times New Roman><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt' l1 level1 lfo3 list .25in .5in><span
|
|
MS Mincho><![if !supportLists]><span style='font-family:Verdana'>5.<span
|
|
style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>WMI interface CLSIDs
|
|
are defined in wbemuuid.lib. If you get unresolved externals in interfaces and
|
|
CLSIDs, this is what is missing. <o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:-30.0pt' list .5in><span MS Mincho
|
|
Times New Roman><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt' l1 level1 lfo3 list .25in .5in><span
|
|
MS Mincho><![if !supportLists]><span style='font-family:Verdana'>6.<span
|
|
style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>You'll need to link
|
|
with oleaut32.lib and ole32.lib to get the needed COM support.<o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:-30.0pt' list .5in><span MS Mincho
|
|
Times New Roman><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt' l1 level1 lfo3 list .25in .5in><span
|
|
MS Mincho><![if !supportLists]><span style='font-family:Verdana;mso-fareast-font-family:
|
|
"MS Mincho"'>7.<span style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>In the Link|Output
|
|
settings, specify 'wWinMainCRTStartup' as the entry point. This is per the
|
|
Unicode programming instructions.</span><span style='font-family:Verdana;
|
|
mso-fareast-font-family:"MS Mincho"'><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana;mso-fareast-font-family:
|
|
"MS Mincho"'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt'><![if !supportLists]><span
|
|
style='font-family:Verdana;mso-fareast-font-family:"MS Mincho"'>8.<span
|
|
style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana;mso-fareast-font-family:
|
|
"MS Mincho"'>If you're using the makefiles, don't forget to set the Visual C++
|
|
environment variables. This is done by running VCVARS32.BAT.<o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText style='margin-left:45.0pt;text-indent:-45.0pt;mso-list:
|
|
l0 level1 lfo2;tab-stops:list 45.0pt 63.0pt'><![if !supportLists]><span
|
|
style='font-family:Verdana'>9.<span style='font:7.0pt "Times New Roman"'>
|
|
</span></span><![endif]><span style='font-family:Verdana'>You may get errors
|
|
attempting to build or run Unicode configurations of the MFC-based
|
|
samples.<span style="mso-spacerun: yes"> </span>The Unicode versions of the
|
|
MFC libraries are not copied to your hard drive unless you select them during a
|
|
Custom installation of VC++. They are not copied during other types of
|
|
installation. To copy the files to your hard drive, rerun Setup, choose Custom
|
|
installation, clear the check boxes for all other components except
|
|
"Microsoft Foundation Class Libraries," click the Details button, and
|
|
select both "Static Library for Unicode" and "Shared Library for
|
|
Unicode." <o:p></o:p></span></p>
|
|
|
|
<p class=MsoPlainText><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
</span>
|
|
|
|
<p class=MsoNormal style='tab-stops:list .5in'><span style='font-family:Verdana'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p>
|
|
|
|
<p class=MsoNormal style='tab-stops:list .5in'><span style='font-family:Arial'><a
|
|
href="http://www.microsoft.com/misc/CPYRIGHT.HTM"><b>© 1998-2001 Microsoft
|
|
Corporation. All rights reserved.</b></a></span></p>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|