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

📄 enable.htm

📁 一个通过程序来使设备工作或者停止的源代码
💻 HTM
字号:
<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="./enable_files/filelist.xml">
<title>Install</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;}
-->
</style>
</head>

<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>

<div class=Section1>

<h2><span style='font-family:Verdana'>Windows 2000 Driver Install Sample <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 program
that can enable and disable a Windows 2000 device driver node. It also
illustrates some of the internal functionality of the Windows 2000 Device
Manager.<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;font-family:Verdana'>This sample is compliant
with x86 and iA64 platforms. There are no known issues with this
application.<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'>To build this sample,
enter the free or checked build environment and run <b>build</b> from the
src\general\enable directory. Once built, this sample produces enable.exe. <o:p></o:p></span></p>

<h3 style='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-family:Verdana'>PROGRAMMING TOUR<o:p></o:p></span></h3>

<p style='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:Verdana'>This program utilizes the Windows
2000 SetupDi and Config Manager functions to Display, Enable, and Disable
Devices. It uses a TreeView Window control to display the devices with the
corresponding device class icon. These Icons are generated by the OS using the
API call SetupDiGetClassImageList().<o:p></o:p></span></p>

<p style='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:Verdana'>Although it is possible to enable
and disable a device node using the Config Manager API functions CM_Enable_DevNode()
and CM_Disable_DevNode(), developers are instead encouraged to use the
DIF_PROPERTYCHANGE install method illustrated in this sample. <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><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></pre><pre>enable.ico<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Icon file</pre><pre>resource.h<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Definitions for resources</pre><pre>enable.rc<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Resource file</pre><pre>common.h<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Common header File</pre><pre>debug.c<span style="mso-spacerun: yes">&nbsp;&nbsp; </span><span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp; </span>Debug Output functions</pre><pre>config.c<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Config Manager support routines</pre><pre>setupdi.c<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SetupDi support routines</pre><pre>enable.c<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Main functions</pre><pre>makefile<span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Standard Windows NT makefile</pre><pre>Sources<span
style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Dependency and include file</pre><pre><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></pre>

<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; Microsoft Corporation 1999</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>

⌨️ 快捷键说明

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