⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8.4 windows management instrumentation.htm

📁 Windows2000后台服务程序开发手册
💻 HTM
📖 第 1 页 / 共 2 页
字号:
            <TABLE style="LINE-HEIGHT: 25px" border=0>
              <TBODY style="LINE-HEIGHT: 25px">
              <TR style="LINE-HEIGHT: 25px">
                <TD style="LINE-HEIGHT: 25px" align=middle><FONT 
                  style="LINE-HEIGHT: 25px" face=arial color=#000000 
                  size=2><FONT style="LINE-HEIGHT: 25px" face=arial 
                  color=#3e80d7 size=2><B 
                  style="LINE-HEIGHT: 25px">&nbsp;列表8-2&nbsp;</B></FONT>TimeServiceProvider范例之WMI提供者的MOF文件</FONT></TD></TR></TBODY></TABLE></CENTER></A><A 
            style="LINE-HEIGHT: 25px" name=208007>
            <P><FONT style="LINE-HEIGHT: 25px" face=arial color=#3e70d7 
            size=5><B style="LINE-HEIGHT: 25px">固定结构的设定<BR 
            style="LINE-HEIGHT: 25px"> </B></FONT></P>
            <P><FONT style="LINE-HEIGHT: 25px" face=arial color=#000000 
            size=2>许多服务要求保存固定结构的设定(我们曾在第五章中讨论如何为此目的而使用登录)。一个选择是,您可以在经由Win32_Service取回的类别中建立属性,或者使用内附在WMI中的一个标准提供者。为了使用这个提供者,您只需编写一个合适的MOF文件即可。</FONT></P>
            <P><FONT style="LINE-HEIGHT: 25px" face=arial color=#000000 
            size=2>WMI在以下的登录机码下保留了它的所有结构资讯,例如,自动取回MOF文件的目录位置以及启动堆积(Heap)分配的大小:</FONT></P>
            <DIV style="LINE-HEIGHT: 25px; BACKGROUND-COLOR: #d7d7d7"><FONT 
            style="LINE-HEIGHT: 25px" face=Arial size=3><PRE style="LINE-HEIGHT: 25px">HKEY_LOCAL_MACHINE\Software\Microsoft\WBEM</PRE></FONT></DIV>
            <P><FONT style="LINE-HEIGHT: 25px" face=arial color=#000000 
            size=2>以下的MOF文件定义了从CIM_Setting类别取回的一个类别。取回的类别允许您使用WMI察看那些WBEM的登录设定:</FONT></P>
            <DIV style="LINE-HEIGHT: 25px; BACKGROUND-COLOR: #d7d7d7"><FONT 
            style="LINE-HEIGHT: 25px" face=Arial size=3><PRE style="LINE-HEIGHT: 25px">#pragma namespace("\\\\.\\root\\cimv2")&nbsp;&nbsp;<BR>// 实例提供者 <BR>instance of __Win32Provider as $InstProv <BR>{ <BR> Name = "RegProv"; <BR> ClsId = "{fe9af5c0-d3b6-11ce-a5b6-00aa00680c3f}"; <BR>}; <BR>instance of __InstanceProviderRegistration <BR>{ <BR> Provider = $InstProv; <BR> SupportsPut = TRUE; <BR> SupportsGet = TRUE; <BR> SupportsDelete = FALSE; <BR> SupportsEnumeration = TRUE; <BR>}; <BR>[dynamic,provider("RegProv"), <BR>ClassContext("local|hkey_local_Machine\\software\\microsoft\\wbem")] <BR>class Richter_MySettings : CIM_Setting <BR>{ <BR> [key, PropertyContext("CIMOM")] string SettingId;; <BR> [PropertyContext("Autorecover MOFs")] string AutoRecoverMOFs []; <BR> [PropertyContext("Startup Heap Preallocation Size")] <BR>&nbsp;&nbsp;uint32 HeapPreAllocationSize; <BR>};</PRE></FONT></DIV>
            <HR style="LINE-HEIGHT: 25px">

            <P><FONT style="LINE-HEIGHT: 25px" face=Arial color=#3e77d7 size=3 
            Black><B style="LINE-HEIGHT: 25px">说明</B></FONT> </P>
            <P><FONT style="LINE-HEIGHT: 25px" face=arial color=#000000 
            size=2>这些值可以透过Win32_WMISetting类别显示。这个MOF文件只做为示范用。</FONT></P>
            <HR style="LINE-HEIGHT: 25px">

            <P><FONT style="LINE-HEIGHT: 25px" face=arial color=#000000 
            size=2>请注意此MOF文件的二个重要特性。第一,标准的登录提供者被宣告并使用「Win32Provider」和「instance 
            of 
            InstanceProviderRegistration」语法登录。如果一个开发者在CIMV2命名空间中使用这个登录提供者,则此宣告和登录可能已经被完成。第二次执行并不会产生不良的影响。</FONT></P>
            <P><FONT style="LINE-HEIGHT: 25px" face=arial color=#000000 
            size=2>第二,设定子类别的宣告使用「class 
            Richter_MySettings」陈述式处理。必须注意这个经由提供者修饰语使用的类别与登录提供者之关联,以及使用PropertyContext修饰语的属性与录登栏位之关联。PropertyContext修饰语指示了与登录值相对应的属性值。 
            </P>
            <DIV></DIV></FONT></A></DIV< p>
            <P class=content_page><A 
            href="http://www.acejoy.com/Html/Article/network/5920061023091939_P3.html">上一页</A>&nbsp;&nbsp;<A 
            href="http://www.acejoy.com/Html/Article/network/5920061023091939.html">[1]</A>&nbsp;<A 
            href="http://www.acejoy.com/Html/Article/network/5920061023091939_P2.html">[2]</A>&nbsp;<A 
            href="http://www.acejoy.com/Html/Article/network/5920061023091939_P3.html">[3]</A>&nbsp;<STRONG><FONT 
            color=#ff0033>[4]</FONT></STRONG>&nbsp;</P>
            <DIV></DIV><BR><BR></TD></TR></TBODY></TABLE>
      <TABLE style="CLEAR: both" cellSpacing=0 cellPadding=0 width="97%">
        <TBODY>
        <TR>
          <TD align=right>
            <TABLE>
              <TBODY>
              <TR>
                <TD>阅读:<SPAN id=news_hits></SPAN>
                  <SCRIPT 
                  src="8.4 Windows Management Instrumentation.files/GetHits.htm" 
                  type=text/JavaScript></SCRIPT>
                   次<BR>录入:<A 
                  href="http://www.acejoy.com/User/Info.Asp?UserName=winston">winston</A><BR><BR></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD align=right>【 <A 
            href="http://www.acejoy.com/Comment.asp?ChannelID=1&amp;Action=Write&amp;InfoID=59">评论</A> 
            】 【 <A 
            href="http://www.acejoy.com/User/SendMail.asp?Title=Windows2000 服务器端应用程序开发设计指南-Windows Management Instrumentation" 
            target=_blank>推荐</A> 】 【 <A href="javascript:window.print()">打印</A> 
            】 </TD></TR></TBODY></TABLE>
      <TABLE style="CLEAR: both" width="97%" align=center>
        <TBODY>
        <TR>
          <TD>上一篇:<A 
            title="标题:Windows2000 服务器端应用程序开发设计指南-效能监视&#13;&#10;作者:Jeffrey Richter Jason D. Clark&#13;&#10;更新:2006-10-17 12:32:58&#13;&#10;点击:648" 
            href="http://www.acejoy.com/Html/Article/network/5820061017123258.html">Windows2000 
            服务器端应用程序开发设计指南-效能监视</A><BR>下一篇:<A 
            title="标题:Windows2000 服务器端应用程序开发设计指南-信任成员的管理(1)&#13;&#10;作者:Jeffrey Richter Jason D. Clark&#13;&#10;更新:2006-10-26 9:29:05&#13;&#10;点击:409" 
            href="http://www.acejoy.com/Html/Article/network/6020061026092905.html">Windows2000 
            服务器端应用程序开发设计指南-信任成员的管理(1)</A> </TD></TR></TBODY></TABLE></TD>
    <TD class=mr></TD></TR></TBODY></TABLE></DIV></DIV>
<DIV class=mframe>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
  <TBODY>
  <TR>
    <TD class=tl></TD>
    <TD class=tm><SPAN class=tt>相关新闻</SPAN> </TD>
    <TD class=tr></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
  <TBODY>
  <TR>
    <TD class=ml></TD>
    <TD class=mm>
      <TABLE height="100%" cellSpacing=5 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=top>
            <SCRIPT language=javascript 
            src="8.4 Windows Management Instrumentation.files/GetCorrelative.htm"></SCRIPT>
          </TD></TR></TBODY></TABLE></TD>
    <TD class=mr></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
  <TBODY>
  <TR>
    <TD class=tl></TD>
    <TD class=tm><SPAN class=tt>本文评论</SPAN> </TD>
    <TD class=tr></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
  <TBODY>
  <TR>
    <TD class=ml></TD>
    <TD class=mm>
      <P>&nbsp;</P>
      <TABLE height="100%" cellSpacing=5 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=top>
            <SCRIPT language=javascript 
            src="8.4 Windows Management Instrumentation.files/Comment.htm"></SCRIPT>
          </TD></TR></TBODY></TABLE></TD>
    <TD class=mr></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
  <TBODY>
  <TR>
    <TD class=ml></TD>
    <TD class=mm></TD>
    <TD class=mr></TD></TR></TBODY></TABLE></DIV>
<TABLE id=footer cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR style="LINE-HEIGHT: 130%" align=middle>
    <TD height=23>&nbsp;<A 
      href='javascript:window.external.addFavorite("http://www.acejoy.com","ACE开发者")'><FONT 
      color=#000000>加入收藏</FONT></A>&nbsp;- &nbsp;<A 
      href="http://www.acejoy.com/Help.asp?Action=aboutweb" target=_blank><FONT 
      color=#000000>关于本站</FONT></A>&nbsp;- &nbsp;<A class=Bottom 
      href="http://www.acejoy.com/Help.asp?Action=Copyright" target=_blank><FONT 
      color=#000000>版权申明</FONT></A>&nbsp;- &nbsp;<A class=Bottom 
      href="http://www.acejoy.com/Help.asp?Action=aboutweb" target=_blank><FONT 
      color=#000000>联系站长</FONT></A>&nbsp;- &nbsp;<A class=Bottom 
      href="http://www.acejoy.com/LinkSite.asp" target=_blank><FONT 
      color=#000000>友情链接</FONT></A>&nbsp;&nbsp; </TD></TR>
  <TR align=middle>
    <TD height=23>Copyright&copy; 2004-2006 <A 
      href="http://www.acejoy.com/">http://www.acejoy.com/</A> .All Rights 
      Reserved <A href="http://www.miibeian.gov.cn/" target=_blank>京ICP备06055248 
      </A>
      <SCRIPT language=JavaScript 
      src="8.4 Windows Management Instrumentation.files/stat.htm" 
      charset=gb2312></SCRIPT>
    </TD></TR></TBODY></TABLE>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV><!--Powered by:CreateLive CMS Version 3.1(www.acejoy.com) CreateDate:2007-3-4 10:50:39--></DIV></DIV></DIV></DIV></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -