Leaked source code of windows server 2003
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.
 
 
 
 
 
 

294 lines
11 KiB

<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=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="bindview_files/filelist.xml">
<title>Network Configuration/Installation Sample</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@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";}
h1
{mso-style-next:Normal;
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:10.0pt;
font-family:Verdana;
mso-font-kerning:0pt;
font-weight:bold;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
font-weight:bold;}
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
{mso-margin-top-alt:auto;
margin-right:0in;
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";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@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:149904795;
mso-list-type:hybrid;
mso-list-template-ids:2069783722 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><a name="_top"></a><span style='font-family:Verdana'>BINDVIEW: Network
Configuration/Installation 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 sample demonstrates how
to use of <span class=SpellE>INetCfg</span> APIs to enumerate, install, uninstall,
bind and unbind network components.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample compiles
properly for 64-bit, builds properly with Microsoft® Visual C® 6.0. <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 the sample, <span
class=GramE>type <b>build</b></span>. This command produces the binary bindview.exe.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>Copy the
binary bindview.exe to the directory from where you want to run the sample. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RUNNING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal><span class=GramE><span style='font-size:10.0pt;font-family:
Verdana'>Type bindview.exe at the command prompt to run the program.</span></span><span
style='font-size:10.0pt;font-family:Verdana'> You can perform the following
operations.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<ul style='margin-top:0in' type=disc>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Install a network protocol,
service or client component.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Uninstall a network protocol,
service or client component.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>By clicking the right mouse
button on a network protocol, service or client, you can perform the
following operations.<o:p></o:p></span></li>
<ul style='margin-top:0in' type=circle>
<li class=MsoNormal style='mso-list:l0 level2 lfo1;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'><span
style='mso-spacerun:yes'> </span>Bind the network component to another
component.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level2 lfo1;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'>Unbind the network component
from another component that is bound to it.<o:p></o:p></span></li>
</ul>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>By clicking the right mouse
button on a binding path, you can perform the following operations.<o:p></o:p></span></li>
<ul style='margin-top:0in' type=circle>
<li class=MsoNormal style='mso-list:l0 level2 lfo1;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'>Disable the binding path if
it is enabled.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level2 lfo1;tab-stops:list 1.0in'><span
style='font-size:10.0pt;font-family:Verdana'>Enable the binding path if
it is disabled.<o:p></o:p></span></li>
</ul>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Save the binding information to
a file.<o:p></o:p></span></li>
</ul>
<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'>           </span>Description<o:p></o:p></u></pre><pre><span
style='text-transform:uppercase'>BINDVIEW.CPP</span><span style='mso-tab-count:
1'>   </span>Contains <span class=SpellE>WinMain</span> and dialog box related functions.</pre><pre><span
style='text-transform:uppercase'>NetCfgAPI.cpp</span><span style='mso-tab-count:
1'>  </span>Contains <span class=SpellE>INetCfg</span> functions.</pre><pre>BINDING.CPP<span
style='mso-tab-count:1'>    </span>Contains binding path related functions. </pre><pre><span
style='text-transform:uppercase'>Component.cpp</span><span style='mso-tab-count:
1'>  </span>Contains network component related functions.</pre><pre><span
class=GramE>RESOURCE.H<span style='mso-tab-count:1'>     </span>Resource header.</span></pre><pre>BINDVIEW.H<span
style='mso-tab-count:1'>     </span>Contains function prototypes.</pre><pre><span
style='text-transform:uppercase'>NetCfgAPI.h</span><span style='mso-tab-count:
1'>    </span>Contains function prototypes for <span class=SpellE>NetCfgAPI.cpp</span></pre><pre><span
style='text-transform:uppercase'>BindView.rc</span><span style='mso-tab-count:
1'>    </span>Resources for <span class=SpellE>Bindview</span></pre><pre><span
class=GramE><span style='text-transform:uppercase'>BindView.ico</span><span
style='mso-tab-count:1'>   </span>Icon for the sample.</span><o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre><o:p>&nbsp;</o:p></pre>
<p align=center style='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'><a
href="#_top"><span style='font-size:10.0pt;font-family:Verdana'>Top of page</span></a><span
style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<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:7.5pt;font-family:"MS Sans Serif"'>© Microsoft Corporation
1999</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>