<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1720414650144393494</id><updated>2011-11-27T16:38:55.920-08:00</updated><category term='ActiveX'/><title type='text'>ActiveX Tutorial</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1720414650144393494.post-803650956844877500</id><published>2008-11-12T03:22:00.000-08:00</published><updated>2008-12-22T21:26:38.964-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>Activex Q And A</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link style="font-family: trebuchet ms;" rel="File-List" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link style="font-family: trebuchet ms;" rel="themeData" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link style="font-family: trebuchet ms;" rel="colorSchemeMapping" href="file:///D:%5CUSERPR%7E1%5Csshende%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;JA&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="0" name="header"&gt;   &lt;w:lsdexception locked="false" priority="0" name="footer"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="0" name="page number"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="0" name="Body Text"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="0" name="Hyperlink"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:SimSun; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-alt:宋体; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;} @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face 	{font-family:T3Font_1; 	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:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:T3Font_0; 	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:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:T3Font_2; 	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:auto; 	mso-font-signature:3 0 0 0 1 0;} @font-face 	{font-family:"\@SimSun"; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:SimSun; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:ZH-CN;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:SimSun; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:ZH-CN;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* 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-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"MS Mincho"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;What's In This Document?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;This document describes the changes in Internet Explorer 7 that reduce the number of ActiveX controls enabled by default&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;through a feature called "ActiveX Opt3In".&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;This document also describes some of the best practices for developing ActiveX controls intended to run in Internet Explorer.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;These best practices have been compiled from the Security Development Lifecycle and from software developers who develop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;and test ActiveX controls intended for safe use on the Internet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Where does ActiveX Opt_In apply?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;&lt;span style=""&gt; &lt;/span&gt;Where does it not apply?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ActiveX Opt3In applies to controls run in Internet Explorer and any applications which opt3in to Manage Add3ons through the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;feature control key. ActiveX Opt3In can be enabled or disabled on a zone3by3zone basis through the IE Security Settings panel.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;The setting, "Allow previously unused ActiveX controls to run without prompt" enables and disables the feature. By default,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ActiveX Opt3In applies to controls used on the Internet and restricted sites zones while controls used on an intranet and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;trusted sites zones will not be affected by ActiveX Opt3In.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Should your control be on the pre_approved list?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Having your control on the pre3approved list can be valuable in some, but not all, situations. The situations below will help you&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;determine if you need your control to be on the pre3approved list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Putting a control on the pre3approved list will attract the attention and scrutiny of the security research community. Any&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;vulnerabilities found in your control would expose a significantly larger number of users than if your control were not on the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;pre3approved list. Keeping your control off the pre3approved list will keep users secure by default and protect customers who&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;are not using your control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Your control &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;should &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;be on the pre3approved list if:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Your control is (or uses) an ActiveX control that is pre_installed on a user's machine by Windows or by an OEM.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Controls installed by Windows or by an OEM will be disabled by ActiveX Opt3In unless you take steps to pre3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;approve them. Pre3approving your controls will insure that users have the best possible experience on your Web&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;site because it will work the way that you and the user expect.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Your control is intended to run from Internet Zone Web pages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If, in the process of installing your application, ActiveX controls are installed which are intended to run on the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Internet, you might want to add these controls to the pre3approved list. Because the controls were installed by&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;software, and not by the user, the controls will be disabled by ActiveX Opt3In.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Your control should &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;not &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;be on the pre3approved list if:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Your control is not intended to be run in Web pages served from the Internet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If your control is not intended to run in pages served from the Internet, then it should not be on the pre3approved&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;list. There are two steps we highly recommend in order to prevent the control from running in IE.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;1. &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Killbitting the control &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://support.microsoft.com/kb/240797 ] will ensure that it can never load in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IE. Killbitting the control only requires setting a registry bit and is easily accomplished.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;1. &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Killbitting the control &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://support.microsoft.com/kb/240797 ] will ensure that it can never load in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IE. Killbitting the control only requires setting a registry bit and is easily accomplished.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;2. Do not mark the control safe for initialization or scripting. You should ensure this is true in both the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;component categories as well as through &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IObjectSafety &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Mechanisms.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Your control is downloaded to the user's machine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If your control is not locally installed on the user's machine then there is no need to be on the pre3approved list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;When the user downloads the control and chooses to install it, then the control will be approved. The user will not&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;be prompted again after choosing to install from the authenticode dialog. Note: only the control whose CLSID was&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;included in the object tag will be approved. If you have a single cab file which installs multiple controls, only the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;control initialized in the object tag will be approved. You might need to pre3approve any other controls which&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;the .CAB file installs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Your control is only intended to run on your corporate intranet or your control is for a line of business application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;You should not add these controls to the pre3approved list. ActiveX Opt3In is turned off by default in the intranet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;zone so your corporate ActiveX controls will not be affected. It would be a good idea to zone3lock these controls or&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;restrict their capabilities when not running on an intranet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If you have controls created for business applications which are not applicable to the general public, these&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;controls should not be pre3approved. You should work with the network administrators where your applications&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;run to ensure that the right controls get approved on your users’ machines. This can be done either through&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Manage Add3Ons group policy &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://support.microsoft.com/kb/883256 ] or by adding the controls to the pre3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;approved list in the registry.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;How does my control get onto the pre_approved list?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Because pre3approved controls add to the attack surface of a user’s system, you should make sure that your controls have&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;been designed with security in mind. As the vendor for your ActiveX control, you are responsible for designing and testing it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;to ensure that the control meets the best practices criteria described in this document. By adding your control to the pre3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;approved list, you are warranting that you have reviewed the best practices for secure development outlined in this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;document and certify that implementation of your control followed these or equivalent principles for secure development of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ActiveX controls. You are certifying that your control has no vulnerabilities to the best of your knowledge.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;To put your control on the pre3approved list, you need to write the CLSID of the control to the following registry location.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;HKEY_LOCAL_MACHINE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;SOFTWARE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Microsoft&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Windows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;CurrentVersion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Ext&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;PreApproved&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If Microsoft determines that a control has a vulnerability and presents a danger to end users, Microsoft reserves the right to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;remove that control at any time from the pre3approved list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;How to build secure ActiveX controls&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Building a secure ActiveX control requires that designers, developers, and testers focus on security throughout the product&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;lifecycle. Designers must restrict the capabilities of the control so that it can accomplish only the work it needs to do without&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;any additional capabilities that might lead to exploits. Developers must code the control to act appropriately and safely when&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;handling data. Testers must include test cases based on potential threats to the control. At each stage in the development&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;lifecycle, security must be considered. The next sections go into more details on specific steps and considerations at each&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;stage in the lifecycle of a control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 8pt; color: black;"&gt;Principles of Secure Design for ActiveX Controls&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Designing for security is important because ActiveX controls are exposed to content from malicious Web sites. Any Web site&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;can try to use the control; all it needs is the control's class identifier (CLSID). When you designed your control, you may have&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;thought primarily about the control being used by some well intentioned pages, maybe even on your own website. To be safe&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;for running in the internet zone, you must design your control to be safe when loaded from any page on the internet,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;particularly malicious pages. You need to ensure that malicious Web sites can't exploit your control to harm the user's system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;As you design, think about how the functionality of your control could be exploited and what measures you can take to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;protect users from these exploits.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Restrict the capabilities of your control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Because an ActiveX control is a Microsoft Win32 component, there is no sandboxing33it can run without restrictions. You&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;should think about how you can restrict the functionality of your control to prevent others from repurposing it to malicious&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ends. One of the first things you should think about when you consider writing an ActiveX control is if you really need an&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ActiveX control to accomplish the functionality you need. If you do not need access to system resources, you can write the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;control as a &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Dynamic HTML (DHTML) behavior &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://msdn.microsoft.com/library/default.asp?url=/workshop/author/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;behaviors/overview.asp ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;In order for your control to be safe, the interface exposed to &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IDispatch &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;(and therefore the Web) should be scoped as narrowly&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;as possible while still meeting your functional requirements. If your function does not absolutely require input parameters,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;then remove them. If you can narrow the scope of the input parameters to a handful of known inputs, then do so. If your&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;control writes data to the local computer, or in any way changes the state or behavior of the system, take time to consider&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;how your control might be abused by a malicious third party.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Some scenarios you should consider when designing your control include the following.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Some scenarios you should consider when designing your control include the following.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;How many and what kind of parameters does your control take?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;&lt;span style=""&gt; &lt;/span&gt;Can you reduce the number of parameters or&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;more closely restrict the kind of data they accept?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Does the control rely on the URL of the hosting page to make security decisions? What happens if the control is&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;unable to obtain the hosting URL from Internet Explorer? Does it fail securely in this case?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can the control be made to call other objects on the page, including Java applets? The Microsoft virtual machine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;(Microsoft VM) called from native code in the control might attribute greater permissions to the control than script&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;on the page has. If the script can manipulate the control to call the Microsoft VM for it, an indirect security attack&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;might be possible.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can the control tunnel out of the frame in which it is hosted and access content in another frame? The data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;accessed could potentially violate the privacy of the user. You might prevent this by restricting the control to run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;only within a particular domain.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Many ActiveX controls are initialized with data from local or remote sites, and most ActiveX controls are scriptable, supporting&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;a set of methods, events, and properties. Both initialization of persisted data and use of the controls through scripting require&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;safeguards to ensure that security is not violated. If your control does not read persisted data, don't mark it as safe for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;initialization.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Site_Lock Your Control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;One powerful way to restrict the capabilities of your control is to lock it to a specific domain. If your ActiveX control is&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;designed only for a specific Web site, then locking it to the domain of that Web site will make it harder for other sites to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;repurpose the control in a malicious manner. However, you should be aware that site3locking does not guarantee another site&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;cannot use your control. Cross3site scripting flaws and man3in3the3middle attacks could expose your control to other Web&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;sites. Site3locking should only be used as defense in depth; it cannot be your primary line of defense.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;A site3locking template that uses Microsoft Active Template Library (ATL) is available: &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;SiteLock 1.14 Template for ActiveX&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Controls &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://www.microsoft.com/downloads/details.aspx?FamilyID=43cd7e1e35719345c0388d93&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ec9ea7fefbcb&amp;amp;displaylang=en ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Zone Lock your Control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If site3locking your control is too restrictive, you might still be able to zone3 lock your control. You could zone3lock your control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;so it will only work when IE is in a specific zone, Internet, intranet, trusted sites, or restricted sites. As with site3locking,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;however, zone3locking should be used as defense3in3depth and not a primary line of defense.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;The &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;SiteLock 1.14 Template &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;also provides zone3locking functionality.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Ensure that ActiveX runs under least_privilege environments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;By default, Windows XP user accounts were administrator accounts because many features and programs did not run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;correctly under non3admin privileges. In Windows Vista, this will no longer be true. Users, by default, will not be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;administrators on their machines. ActiveX controls must be able to operate fully in a non3admin environment. Furthermore,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;when Protected Mode is enabled in IE the entire process will be running at a low integrity level, level 1. Controls need to be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;tested under normal user account privileges and if possible even developed in these accounts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;More information on user account privileges can be found in &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Security in Longhorn: Focus on Least Privilege &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;msdn.microsoft.com/library/default.asp?url=/library/en3us/dnlong/html/leastprivlh.asp ] and &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Understanding and Working in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Protected Mode Internet Explorer &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://msdn.microsoft.com/library/?url=/library/en3us/IETechCol/dnwebgen/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ProtectedMode.asp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;frame=true ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 8pt; color: black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 8pt; color: black;"&gt;Secure Development Practices&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Once you have designed and threat3modeled your control it is time to start implementing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Prevent Denial of Service Attacks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Be sure the control doesn't loop infinitely or stop responding when given bad data or arguments. An attacker might tie up a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;user's computer using your ActiveX control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Safely Handle Memory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;It is important for a secure ActiveX control to check all inputs and guard against buffer overruns. For example, if a control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;receives an input string into a fixed3length buffer without checking its length first, it is possible for a malicious caller to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;provide a string that is longer than the allocated buffer, overwriting other information in an unintended way. In some cases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;these bugs can be exploited to make the control perform unsafe operations it was not designed to do. As the author of an&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ActiveX control, you need to be vigilant. Never assume that a certain input conforms to certain requirements. Always check&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;the data to avoid these attacks. All inputs should have maximum sizes, and controls should be tested to perform safely, even&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;with inputs that are beyond specifications. See &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Fix Those Buffer Overruns &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://www.msdn.microsoft.com/library/en3us/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;dncode/html/secure05202002.asp ] for more information.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Limit Drag_and_Drop Capabilities&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Drag3and3drop capabilities can be used to create many engaging and interactive experiences for users, however, ActiveX&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;controls need to enable and react to these capabilities in a responsible manner. If your control acts as a drop target then you&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;should not perform any unsafe action without prompting the user. If your control is a drag source, then you should be sure to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;set the CFSTR_UNTRUSTEDDRAGDROP Clipboard format. This will insure that any program reading the dropped data will know&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;that it should not be fully trusted. You should also be aware that drag3and3drop capabilities in IE are now limited by a security&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;setting which may restrict the drag3and3drop capabilities of your control (URLACTION_SHELL_ENHANCED_DRAGDROP_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;SECURITY).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;For more information on tagging clipboard data, please see &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Shell Clipboard Formats &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://msdn.microsoft.com/library/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;default.asp?url=/library/en3us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_programming/transferring/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;clipboard.asp ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;For more information on the IE security setting regarding drag3and3drop, please see &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;URL Action Flags &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;msdn.microsoft.com/library/default.asp?url=/workshop/security/szone/reference/constants/urlaction.asp ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Safe for Scripting and Safe for Initialization&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;There are a few different mechanisms that IE uses to determine that controls are safe to initialize and script. The&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IObjectSafety &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;interface and Component categories manager are two tools that IE uses.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;One of the first things to note about marking a control safe for scripting or initialization is that this should only be done for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;controls which you actually intend to be initialized or scripted. If your control does not need scripting functionality then do&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;not mark it as such.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;IObjectSafety &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://msdn.microsoft.com/library/default.asp?url=/workshop/components/com/reference/ifaces/iobjectsafety/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;iobjectsafety.asp ] is an interface that IE can use after a control is loaded to query the control and determine if the control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;believes that it is safe to be initialized and scripted. The component categories manager is a method for controls to register&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;themselves as safe for use in IE. These are registry settings which IE can check prior to loading a control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;believes that it is safe to be initialized and scripted. The component categories manager is a method for controls to register&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;themselves as safe for use in IE. These are registry settings which IE can check prior to loading a control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;The &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IObjectSafety &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;interface supports two methods, &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IObjectSafety::GetInterfaceSafetyOptions &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IObjectSafety::SetInterfaceSafetyOptions&lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;. The &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;GetInterfaceSafetyOptions &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;method should return the control's security&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;capabilities, safe for initialization and/or safe for scripting. The &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;SetInterfaceSafetyOptions &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;method is a request from the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;container, IE, to the control and indicates that the control should configure itself to be safe for initialization or scripting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;The component category manager is a way that IE uses the registry to determine when controls are safe for initialization and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;scripting. You should be sure to register your control with the component category manager when it is installing. Details on&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;how to set these registry keys can be found at &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;How to mark MFC ActiveX controls as Safe for Scripting and Initialization&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://support.microsoft.com/kb/161873/ ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;For more information on marking ActiveX controls safe for initialization and scripting via &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IObjectSafety &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;and Component&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Categories, please see &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Safe Initialization and Scripting for ActiveX Controls &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://msdn.microsoft.com/library/default.asp?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;url=/workshop/components/activex/safety.asp ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Controls that Operate in the Local Machine Zone&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;ActiveX controls operating within the Local Machine Zone should not allow arbitrary content from the Internet to be written to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;files in predictable locations without user interaction. Furthermore, controls operating in the Local Machine Zone should not&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;allow execution of arbitrary code directly or indirectly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Design your control to be compatible with the Data Execution Prevention Feature&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Data Execution Prevention (DEP) is a set of hardware and software technologies that perform additional checks on memory to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;help prevent malicious code from running on a system. DEP is available on Microsoft Windows 2003 Server SP1, Windows XP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Service Pack 2, Windows XP Tablet PC Edition 2005, and on Windows Vista.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;DEP works by preventing code execution from data memory that is not marked EXECUTABLE, such as the stack and heaps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Hardware3enforced DEP detects code that is running from these locations and raises an exception when execution occurs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Software3enforced DEP is a subset of hardware3enforced DEP, for machines that do not have supporting processors, and can&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;help prevent malicious code from taking advantage of exception3handling mechanisms in Windows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Controls which are DEP compatible cannot execute code from any page which is marked non3executable. Note, ATL 7.1 and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;earlier is not DEP compatible so if you use ATL, you will need to compile your control with ATL 8.0 or later.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;IE provides a setting you can enable to test your control with the DEP feature. Go to the Tools | Internet Options | Advanced&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;tab and check the setting "Enable memory protection to help mitigate online attacks". (Note if you are running on Windows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Vista, this setting can only be changed if Protected Mode is disabled. Once the feature is enabled, you can run in Protected&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;mode.) You should use this IE setting to test your control and make sure it is compatible with DEP. Once your code is&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;compatible with DEP, you should link your code with /NXCOMPAT.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;For more information, please see Changes to Functionality in &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Microsoft Windows XP Service Pack 2, Part 3: Memory Protection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Techniques &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2mempr.mspx ] and &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;A Detailed Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;of the Data Execution Prevention (DEP) Feature &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://support.microsoft.com/kb/875352 ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Use Automated Tools to Evaluate Your Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Use Automated Tools to Evaluate Your Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Code reviews and quality assurance testing are highly valuable processes which are able to find and correct many bugs and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;threats; however, more recently, new automated tools have become available which can review your code and flag potential&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;problem areas. One tool which Microsoft releases is called PreFast. It is available as part of Visual Studio Team System 2005&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;and also in the Windows DDK. PreFast will step through all the execution paths in your source code and look for errors in the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;following areas.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Memory: &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Potential memory leaks, de3referenced NULL pointers, access to uninitialized memory, excessive use of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;the kernel3mode stack, and improper use of pool tags.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Resources: &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Failure to release resources such as locks, resources that should be held when calling some functions,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;and resources that should not be held when calling other functions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Function usage: &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Potentially incorrect usage of certain functions, function arguments that appear incorrect,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;possible argument type mismatches for functions that do not strictly check types, possible use of certain obsolete&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;functions, and function calls at a potentially incorrect IRQL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Floating point state: &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Failure to protect floating point hardware state in a driver and attempting to restore floating&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;point state after saving it at a different IRQL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Precedence rules: &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Code that might not behave as the programmer intended because of the precedence rules of C.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Kernel_mode coding practices: &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Coding practices that can cause errors, such as modifying an opaque memory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;descriptor list (MDL) structure, failing to examine the value of a variable set by a called function, and using C/C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;string manipulation functions rather than the safe string functions defined in Ntstrsafe.h.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Driver_specific coding practices: &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Specific operations that are often a source of errors in kernel3mode drivers, such&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;as copying a whole I/O request packet (IRP) without modifying members and saving a pointer to a string or&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;structure argument instead of copying an argument in a DriverEntry routine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;This kind of automated code checking can greatly increase the security of your code and also reduce the number of bugs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;found later during testing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;For more information on PreFast, please see &lt;/span&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;PREfast Step3by3Step &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://www.microsoft.com/whdc/DevTools/tools/PREfast_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;steps.mspx ] .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Digitally Sign your Control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;A digital signature on your control enables users to verify the control's publisher and ensures that it has not been tampered&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;with since being published. Digital signatures help users make better trust decisions when determining if they should install a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;control and help identify your control in the Internet Explorer's Add3on Manager.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Digitally signing controls is a vital step if you want users to be able to easily install your control. Users are strongly&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;discouraged from installing unsigned controls, and unsigned controls are blocked from installation by default.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Internet Explorer's Manage Add3Ons dialog displays information about all of the controls on a user's system. (To open the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;dialog, choose Manage Add3 Ons from the Tools menu.) Signing your control will ensure that the Publisher field displays&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;correctly in this list. As you can see in the image below, some of the publishers appear as "(Not Verified)"—these are controls&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;which have not been signed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If your control is installed by a CAB file or another executable, you must be sure to sign both the installation file (to enable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;installation) and the .dll or ocx file containing the ActiveX control (to ensure your publisher name shows up without the "Not&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;verified" notice).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;The name displayed in the Name Field of the Manage Add3Ons dialog is taken from the following registry setting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;HKEY_CLASSES_ROOT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;CLSID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;{Control CLSID}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;AppName="contoso.exe"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;(Default)=(REG_SZ)"Control Name"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;LocalizedStringPolicy=(REG_SZ) Localized Control Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If you have a name that localized for other languages, set LocalizedString to point to the resource ID in your control's binary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;file that contains the translated name. Manage Add3ons checks this value first, and uses it if it exists. If the localized string&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;does not exist, we fall back to the default value, which is (usually) the English name that does not get localized.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;For more information, please see the following resources.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Signing and Checking Code with Authenticode &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://msdn.microsoft.com/library/default.asp?url=/workshop/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;security/authcode/signing.asp ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: mediumblue;"&gt;Introduction to Code Signing &lt;/span&gt;&lt;span style="font-size: 7pt; color: black;"&gt;[ http://msdn.microsoft.com/library/default.asp?url=/workshop/security/authcode/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;intro_authenticode.asp ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;How to Judge control Security&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;The security of a control is ultimately a subjective judgment. The following questions are designed to help you think about the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;security of your control. You can use them as part of your larger security review.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can you limit domain usage or zone usage? See the section on site3locking your control for more information.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Are you exposing the user's private information over the network or to other users?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can you read, write, create, detect or delete arbitrary persisted data either on the file system, the registry, a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;buddy list, or a camera or other USB devices?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Does this control enable data to passing from one Internet site to another? From the intranet to the Internet?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;From the local computer to the Internet?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can this control host mobile code or script? If so, where does the code or script come from?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Does the control cause arbitrary operations or programs to execute on behalf of the user without notice?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Does this control circumvent/defeat a specific security feature in the browser, operating system, or another&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;application?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can a Web page use this control to cause the system to become unstable or stop responding?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can this control be used to spy on the user without their knowledge?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Can this control be used to spy on the user without their knowledge?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Is there a possibility for cross3site scripting attacks using this control?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Does this control load its own data format? Does this data type have its own security implementation? Does this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;data type allow macros?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Is history, statistical, or debugging information persisted on the local computer? Can a privacy conscious user&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;clear this information? Is the information ever sent over the network? Are globally unique identifiers (GUIDs) used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;to track users?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;These are some other general questions that you should consider as you design your control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Are strings from the network validated, parsed, or filtered? What happens with the strings? What would happen if&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;they contain script? What happens to the strings after they are passed on to another component?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Where might there be buffer overruns? Have you done full testing for buffer overruns on all methods, properties,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;and events?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;What are you doing to stop an extraneous Web site from invoking the control?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;If you don't mark the control "safe for scripting" or "safe for initialization", does that disable the purpose of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;control? Controls are marked as not safe for scripting or data initialization by default. Don't implement them unless&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;the functionality of the control is hampered without them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Does the control present information to the user such that they can always identify its authenticity? Do you&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;digitally sign the control?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;In addition, it is a good idea to document the following information about your control for reference.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Methods&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Properties&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;CLSID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Events&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Owner&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;DLL/OCX name and version&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 8pt; color: black;"&gt;Secure Testing Practices&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Validate the control for security using the following four practices.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Create Test Cases based on Threats Identified in the Threat Model&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;For each threat identified in your threat models, you should create a test case. The test cases should confirm that the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;identified threat has been mitigated by the design or implementation of your control. While design and developer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;documentation can describe how a control should behave, only testing can confirm how a control actually does behave.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Penetration Testing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Penetration testing is security testing in which testers aim to circumvent the security features of an application, or in this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;case, an ActiveX control. Penetration testing includes, but is not limited to, denial of service, stress testing of all network&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;interfaces and fuzz testing of all file formats used by the control. Penetration testing should verify any explicit access controls,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;such as ACLS and also verify correctness in all code which processes untrusted data. You should also test any security&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;mitigation you may have included in the control. For example, if you site3locked your control, you should do testing of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;control on other Web sites to insure that site3locking was properly implemented.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Fuzz Testing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Fuzz testing should be performed on any ActiveX control that handles data. The idea behind fuzz testing is to provide&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;structured but invalid inputs to your control. This kind of testing requires a high volume of test cases, with many variations&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;and mutations in the data that you test the control with. Most often, fuzz testing is done using automated tools. The objective&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;of fuzz testing is not to ensure that your control acts in an expected manner on the invalid data but to ensure that your&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;control acts in a safe manner when given invalid data. Your control should not crash or cause a buffer overrun when handling&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;invalid data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Fuzz Testing should be done on the following areas of your control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Any methods within the control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;All parameters used by the control&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Any data from a remote source, for example if you have a property that takes a URL you should fuzz test the URL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;itself but you should also fuzz test the file that is downloaded from the URL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;There are two different parameters to consider when choosing the fuzz data you test your control on. The first consideration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;you might make is whether to use a smart or dumb form of data generation. The differences in these two forms are similar to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;the difference between black box and white box testing. Dumb data generation, similar to black box testing, generates input&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;without knowledge of the intended data format or processing functions. Smart data generation, similar to white box testing,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;generates input based on knowledge of the correct data structure and how it is processed in the control. A second&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;consideration when generating data is whether to generate new data or to mutate valid data. Generating new invalid data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;may be more appropriate when you are doing dumb fuzz testing. Mutating valid data so that it becomes invalid may be more&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;appropriate when you are doing smart fuzz testing. For most controls you will want to use a combination of dumb and smart&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;fuzz testing and generate some of the test data while also mutating other data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Regression Testing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Regression Testing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Regression testing ensures that new changes in the code have not broken any functionality which was previously working.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Regression testing needs to be done at every major milestone in the development cycle. It is important to regression test not&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;only on the functionality of your controls but your security test cases as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Acknowledgements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;We would like to thank the following for their help in preparing and reviewing this article: David Ross, Philip Nachreiner, Eric&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; font-family: trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; color: black;"&gt;Lawrence, Mike Friedman, Patrick Mann, Levent Besik, Cullen Sauls, Josh Cain, and Madhuvan Gupta.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: trebuchet ms;" class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size: 7pt; line-height: 115%; color: black;"&gt;Sharon Cohen &lt;/span&gt;&lt;span style="font-size: 7pt; line-height: 115%; color: black;"&gt;and &lt;/span&gt;&lt;span style="font-size: 7pt; line-height: 115%; color: black;"&gt;Rob Franco &lt;/span&gt;&lt;span style="font-size: 7pt; line-height: 115%; color: black;"&gt;are program managers on the Internet Explorer team.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1720414650144393494-803650956844877500?l=activextutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/803650956844877500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1720414650144393494&amp;postID=803650956844877500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/803650956844877500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/803650956844877500'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/2008/11/activex-q-and.html' title='Activex Q And A'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1720414650144393494.post-9070088785885410526</id><published>2008-08-24T22:57:00.002-07:00</published><updated>2008-12-22T21:26:38.964-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>Adding Tooltip To An ActiveX Control</title><content type='html'>&lt;blockquote&gt; &lt;p align="justify"&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; By default, ActiveX controls do not support tooltips. This                  article demonstrates how to add tooltip to an ActiveX control.                  This control can be used to add tooltips to ActiveX controls                  that we develop. Steps Involved: We have used the 'MFC ActiveX                  Control Wizard' to develop the 'mytooltip' control. The steps                  involved are enumerated below:&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;             &lt;/span&gt;&lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;              &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;(a) Select 'MFC ActiveX Control Wizard' as new                  project type with project name as 'mytooltip'. Click on 'OK'. to                  let the wizard generate the code. &lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;            &lt;/span&gt;&lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;              &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;(b) Open the 'stdafx.h' file associated with the                  project and add the following line: #include              &lt;afxcmn.h&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;            &lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;                &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; The header file 'afxcmn.h' contains declarations for MFC classes that serve as                  wrappers to Windows Common Controls including                  &lt;em&gt;CToolTipCtrl&lt;/em&gt;. Add the following lines to COleControl-derived class &lt;em&gt;CMytooltipCtrl&lt;/em&gt; located in               'mytooltipctl.h': &lt;em&gt;CToolTipCtrl m_ttip;&lt;/em&gt; Use ClassWizard                  to add an &lt;em&gt;OnCreate( )&lt;/em&gt; handler to the message map. It is                  in this routine that the ToolTip control will be created. Add                  the following code to this handler: &lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;              &lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;             m_ttip.Create ( this ) ;&lt;br /&gt;m_ttip.AddTool ( this,                  LPCTSTR ( m_toolTipText ) ) ;&lt;br /&gt;m_ttip.SetTipBkColor ( RGB (                  255,255,0 ) ) ;&lt;br /&gt;m_ttip.SetTipTextColor ( RGB ( 255,0,0 ) ) ;&lt;/span&gt;                  &lt;/blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;             &lt;/span&gt;&lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;              &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Alter &lt;em&gt;CMytooltipCtrl::&lt;/em&gt;DoPropExchange&lt;em&gt;( ) &lt;/em&gt;by                  adding code to initialize the &lt;em&gt;m_toolTipText &lt;/em&gt;and                  m_&lt;em&gt;showToolTip&lt;/em&gt; properties: &lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;              &lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;             PX_Bool(pPX, _T("ShowToolTip"), m_showToolTip, FALSE);&lt;br /&gt;PX_String(pPX,             _T("ToolTipText"), m_toolTipText, _T(""));&lt;/span&gt;              &lt;/blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;             &lt;/span&gt;&lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;              &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;To allow the user of the control some control over                  the ToolTip functionality, use ClassWizard to add the following                  Automation properties to the CBasicCtrl class: &lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;              &lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;             External Name: ShowToolTip ToolTipText&lt;br /&gt;Type:                  BOOL CString&lt;br /&gt;Variable name: m_showToolTip m_toolTipText                 &lt;br /&gt;Notification function: OnShowToolTipChanged                  OnToolTipTextChanged&lt;/span&gt; &lt;/blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;             &lt;/span&gt;&lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;              &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;em&gt;ShowToolTip&lt;/em&gt; will allow the user to suppress                  the display of the tooltip, and &lt;em&gt;ToolTipText&lt;/em&gt; will track                  the text that is to be displayed when the tooltip is visible. To                  make this work we have added a virtual function                  &lt;em&gt;PreTranslateMessage( ) &lt;/em&gt;to the control class and called                  &lt;em&gt;RelayEvent( )&lt;/em&gt; function from it. &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;img src="http://www.kicit.com/freebies/com/mytooltip.gif" width="259" height="234" /&gt; &lt;/span&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1720414650144393494-9070088785885410526?l=activextutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/9070088785885410526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1720414650144393494&amp;postID=9070088785885410526' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/9070088785885410526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/9070088785885410526'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/2008/08/adding-tooltip-to-activex-control.html' title='Adding Tooltip To An ActiveX Control'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1720414650144393494.post-8587423375390028417</id><published>2008-08-24T22:57:00.001-07:00</published><updated>2008-12-22T21:26:38.965-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>Directory Copy Control</title><content type='html'>&lt;p align="justify"&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Frequently we                  wish to build a control which copies one directory to another.                  The standard 'File' dialog is not of much use here since it                  cannot be used as a control inside another dialog. Also the                  standard 'File' dialog permits selection of only files and not                  of directories. To meet this requirement we have developed here                  an ActiveX directory control. We have used the 'MFC ActiveX                  Control Wizard' to develop the dircopy control. The steps                  involved are enumerated below:                 &lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;              &lt;li&gt;                 &lt;p align="justify"&gt;Select 'MFC ActiveX Control Wizard' as new project type                      with project name as 'DirCopy'. Click on 'OK'.                               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;                 &lt;p align="justify"&gt;In Step 1 of 2 select '1' for 'How many controls would                      you like your project to have?'. Click on 'Next'. Click on                      'Finish' to let the wizard generate the code.                         &lt;/p&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;             &lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;              &lt;/span&gt;&lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Next we have added an OnCreate( ) handler                  to the CDirCopyCtrl class. From the OnCreate(                  ) handler we have made a provision to create tooltips. For                  more information on tooltips to an activex control see 'ToolTips                  to an activx control' in the same website. and then we have                  laoded a bitmap. In OnDraw( ) handler we have built the                  folder bitmap using &lt;em&gt;BitBlt( )&lt;/em&gt; . We have added                  &lt;em&gt;OnLButtonDown( )&lt;/em&gt; handler to &lt;em&gt;CDirCopyCtrl&lt;/em&gt;. In                  this handler we have written a code for popping up a copy                  dialog, so whenever we click left mouse button on the folder                  bitmap a copy dialog gets popped up. This dilaog box contains                  two edit boxes one for source and another for target directory.                  We can also browse for the directoy using the 'Browse' button                  present on the copy dialog . Whenever we click on the 'Browse'                  button 'dirdialog' gets popped up and helps you to browse the                  directory from the treeview control. After browsing both the                  directory paths we can click on copy button to copy the                  directory.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;img src="http://www.kicit.com/freebies/com/dircopy1.gif" width="339" height="140" /&gt;&lt;br /&gt;&lt;img src="http://www.kicit.com/freebies/com/dircopy2.gif" width="285" height="319" /&gt; &lt;/span&gt;&lt;/span&gt;&lt;/ul&gt; &lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;a href="http://www.kicit.com/freebies/com/dircopy.zip"&gt;&lt;br /&gt;&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1720414650144393494-8587423375390028417?l=activextutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/8587423375390028417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1720414650144393494&amp;postID=8587423375390028417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/8587423375390028417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/8587423375390028417'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/2008/08/directory-copy-control.html' title='Directory Copy Control'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1720414650144393494.post-404080648226436815</id><published>2008-08-24T22:56:00.004-07:00</published><updated>2008-12-22T21:26:38.965-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>ActiveX Directory Control</title><content type='html'>&lt;p align="justify"&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;  This article demonstrates use of stock property pages in                  an ActiveX control. The system provides three stock property                  pages that ActiveX controls can use: a color page for color                  properties, a picture page for picture properties and a font                  page for font properties. Here we have created an edit control                  whose properties can be changed using the color and a font                  property page. This control has been developed using 'MFC                  ActiveX Control Wizard'. While going through the steps of the                  Wizard we chose 1 control for ' ' and 'EDIT' window as a                  subclass. To add property pages to the control do the following:                   &lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;ol type="a"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;li&gt;   &lt;p align="justify"&gt;Open 'MFC &lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;ClassWizard&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;' dialog box.                      Select the 'Automation' tab sheet. Click on the 'Add                      Property' button. &lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;li&gt;   &lt;p align="justify"&gt;From the 'External&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;   &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; Name' combo box                      select 'Font' and 'Back Color'. By adding external names we                      can interact with the property pages. &lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;li&gt;   &lt;p align="justify"&gt;Add the following &lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt; two&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;                  lines:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ol&gt; &lt;p style="margin-left: 45px;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;PROPPAGEID(CLSID_CFontPropPage)&lt;br /&gt; PROPPAGEID(CLSID_CColorPropPage)&lt;br /&gt;between&lt;br /&gt;BEGIN_PROPPAGEIDS( )&lt;br /&gt;END_PROPPAGEIDS( )&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="justify"&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; This helps in adding property pages to the 'Properties'                  dialog of our control. We have used the color property page to  &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt; &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;span style="font-family:arial;font-size:85%;"&gt;                 select the color for the background of the edit window and font                  property page to select the style of text which appears in the                  edit window. To paint the background of the edit control we have                  added following lines in the &lt;em&gt;OnDraw( ) &lt;/em&gt;function of the                  &lt;em&gt;CStockpagesCtrl&lt;/em&gt; class.  &lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:arial;font-size:85%;color:#0000ff;"&gt; COLORREF clrBackGround = TranslateColor ( GetBackColor( )                  ) ;&lt;br /&gt;CBrush* prevbrush ;&lt;br /&gt;CBrush brBackGround ( clrBackGround ) ;&lt;br /&gt;pdc -&gt; FillRect ( rcBounds, &amp;amp;brBackGround ) ;&lt;br /&gt;prevbrush = pdc -&gt; SelectObject (                  &amp;amp;brBackGround ) ;&lt;br /&gt;pdc -&gt;                  SelectObject ( prevbrush ) ;&lt;br /&gt;CRect rc (                  rcBounds ) ;&lt;br /&gt;pdc -&gt; DrawEdge ( rc, EDGE_SUNKEN, BF_RECT ) ;  &lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p align="justify"&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; As we type in the edit window we get the default                  backgorund color of the text. This brings a bad effect of                  erasing the background color of the edit window. To prevent this                  we have to make the &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt; &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;span style="font-family:arial;font-size:85%;"&gt;  default background color of the text as                  transparent. For this we have added a message handler                  &lt;em&gt;CtlColor( ) &lt;/em&gt;for the message &lt;em&gt;ON_WM_CTLCOLOR_REFLECT(                  )&lt;/em&gt; and have added the following code to it: &lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:arial;font-size:85%;color:#0000ff;"&gt; pDC-&gt;SetBkMode(TRANSPARENT); &lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p align="justify"&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; To change the font of text we just have to select the type                  from the property page and the effect is seen  &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt; without&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;span style="font-family:arial;font-size:85%;"&gt;  writing a                  single line of code.  &lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;img src="http://www.kicit.com/freebies/com/stockproperty1.gif" width="433" height="279" /&gt;&lt;br /&gt;&lt;img src="http://www.kicit.com/freebies/com/stockproperty2.gif" width="433" height="279" /&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1720414650144393494-404080648226436815?l=activextutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/404080648226436815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1720414650144393494&amp;postID=404080648226436815' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/404080648226436815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/404080648226436815'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/2008/08/activex-directory-control_24.html' title='ActiveX Directory Control'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1720414650144393494.post-2943912672795914256</id><published>2008-08-24T22:56:00.003-07:00</published><updated>2008-12-22T21:26:38.965-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>Client Program That Uses Directory List And File List</title><content type='html'>&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;This program uses two ActiveX controls: a                  'Dir' control and a 'Filelist' control. Creation of these                  controls has been discussed in the first two articles of the                  section 'ActiveX' in this same site. We have created the a                  dialog-based project called 'client' using MFC AppWizard. To use                  the ActiveX controls they have to be registered with the Windows                  registry. If you want to register these controls on your machine                  you will have to download these controls from the first two                  articles in the section 'ActiveX' on this site. Once registered                  these controls can be inserted in the dialog box. using the                  following procedure: From the 'Project' menu select 'Add To                  Project' then select 'Components and Controls'. A dialog box                  will be popped up. Open 'Registered ActiveX Controls' folder.                  Search for the control to be inserted; in our case 'Dir' control                  and 'Filelist' control. Double click on both the controls to                  insert them in the project. The bitmaps of these controls would                  now be visible in the 'Controls' toolbar of the dialog editor.                  Pick both and paste them side by side. You can see the preview                  of both in the dialog box. The dialog that we created is shown                  in Figure 1. Run the application to see the effect. The two                  controls are independent of one another. Our client program                  helps them to interact. When we select any directory from the                  'Dir' control our client program recieves an event with full                  path of the selected directory. The client program then calls                  &lt;em&gt;SetPath( )&lt;/em&gt; and &lt;em&gt;SetFormat( )&lt;/em&gt; functions of the                  'Filelist' control. Hence whenever we select the directory from                  the 'Dir' control the files present in the specified directory                  are listed in 'Filelist' control. When we click on the filename                  from the 'Filelist' control our client program recieves an event                  with full path of the selected filename which is then displayed                  in the edit box. &lt;/span&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;br /&gt;&lt;img src="http://www.kicit.com/freebies/com/activexclient.gif" width="636" height="462" /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1720414650144393494-2943912672795914256?l=activextutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/2943912672795914256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1720414650144393494&amp;postID=2943912672795914256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/2943912672795914256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/2943912672795914256'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/2008/08/client-program-that-uses-directory-list.html' title='Client Program That Uses Directory List And File List'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1720414650144393494.post-6349030380759475082</id><published>2008-08-24T22:56:00.001-07:00</published><updated>2008-12-22T21:26:38.965-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>File List Control</title><content type='html'>&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Like the standard 'File' dialog that lists files of the specified              types we wish to create a control that would list files of the              specified type present in the specified directory. As against the              standard 'File' dialog this control can be embedded into a dialog or              a form. Steps Involved: We have used the 'MFC ActiveX Control              Wizard' to develop the directory control. The steps involved are              enumerated below: &lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;            &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;(a) Select 'MFC ActiveX Control Wizard' as new project type with              project name as 'filelist'. Click on 'OK'. &lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;            &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;(b) In Step 1 of 2 select '1' for 'How many controls would you              like your project to have?'. Click on 'Next'. &lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;            &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;(c) In Step 2 of 2 select 'SysListView32' for 'Which window              class, if any, should this control subclass?'. Click on 'Finish' to              let the wizard generate the code. &lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;            &lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Click on the 'Class View' tab and in the &lt;em&gt;PreCreateWindow( )              &lt;/em&gt;virtual function you can see the line cs.lpszClass =              _T("SysListView32"); This line indicates that              &lt;em&gt;SysListView32&lt;/em&gt; window class has been made as a subclass of              the listexplorer control. Hence the messages would be received by              the control class before reaching the &lt;em&gt;SysListView32&lt;/em&gt; window              class. To change the style of the tree window we have added: &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt; cs.style |= WS_CHILD | WS_BORDER | LVS_SMALLICON |              LVS_SHOWSELALWAYS ;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;             &lt;/span&gt;&lt;/span&gt;&lt;p align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Next we have added an &lt;em&gt;OnCreate( )&lt;/em&gt; handler to the              &lt;em&gt;CFilelistCtrl&lt;/em&gt; class. From the &lt;em&gt;OnCreate( )&lt;/em&gt; handler              we have called &lt;em&gt;addtolist( )&lt;/em&gt; function. This function finds              the files depending on the type of the specified directory. The              default type is '*.*' and the default specified directory is 'c:\'.              The default type and the directory are represented by two member              variables of the &lt;em&gt;CFilelistCtrl&lt;/em&gt; class. The &lt;em&gt;addtolist(              )&lt;/em&gt; function uses a pointer to &lt;em&gt;CListCtrl&lt;/em&gt; class's object              to add filenames to the list control. The pointer variable has been              defined as a public data member of the &lt;em&gt;CListexplorerCtrl&lt;/em&gt;              class. The pointer has been initailised with the handle of the list              control in the &lt;em&gt;OnCreate( )&lt;/em&gt; handler. On selecting items              (filenames) from the list control we have fired an event consisting              the fullpath with filename. This is done in &lt;em&gt;onitemchanged(              )&lt;/em&gt; function which gets called on selecting any item. The event              has been fired by using the function &lt;em&gt;FireGetPathFromList( )&lt;/em&gt;              function. We have also added a custom property page which consists              of two edit boxes one for the type of file to be listed and the              second for the directory path. This requires two property variables              'path' and 'format' to be added. Using these two variables we can              access values from the custom property page in &lt;em&gt;DoPropExchange(              )&lt;/em&gt; function. As we add two property variables (path and format)              two functions(&lt;em&gt;OnPathChanged( )&lt;/em&gt; and &lt;em&gt;OnFormatChanged(              )&lt;/em&gt; respectively) are added to the &lt;em&gt;CFilelistCtrl&lt;/em&gt; class.              These functions get called as we click on 'Apply' button of the              property dialog box. From these functions we have called              &lt;em&gt;addtolist( )&lt;/em&gt; function to reflect the changes in the list              control. If we run this program the control will register itself              with the Windows registry on that machine. A dialog box would be              displayed asking for the exe file to be used as a container for this              control. We can 'Microsoft's ActiveX Test Container' to display the              control. Here we have to insert our control from the 'Insert              control' box. The container contains of a splitter window. The upper              window displays the control and the lower window displays the events              generated by the control. &lt;br /&gt;&lt;br /&gt;            &lt;img src="http://www.kicit.com/freebies/com/listexplorer.gif" width="504" height="352" /&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1720414650144393494-6349030380759475082?l=activextutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/6349030380759475082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1720414650144393494&amp;postID=6349030380759475082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/6349030380759475082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/6349030380759475082'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/2008/08/file-list-control.html' title='File List Control'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1720414650144393494.post-5009688644940194402</id><published>2008-08-24T22:55:00.001-07:00</published><updated>2008-12-22T21:26:38.965-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>ActiveX Directory Control</title><content type='html'>&lt;p align="justify"&gt;  &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Frequently we wish to display a list of                  directories as a control inside a dialog. The standard 'File'                  dialog is not of much use here since it cannot be used as a                  control inside another dialog. Also the standard 'File' dialog                  permits selection of only files and not of directories. To meet                  this requirement we have developed here an ActiveX directory                  control. Steps Involved:&lt;br /&gt;We have used                  the 'MFC ActiveX Control Wizard' to develop the directory                  control. The steps involved are enumerated below:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol type="a"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;li&gt; &lt;p align="justify"&gt; Select 'MFC ActiveX Control Wizard'                      as new project type with project name as 'Dir'. Click on                      'OK'. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;    &lt;p align="justify"&gt; In Step 1 of 2 select '1' for 'How                      many controls would you like your project to have?'. Click                      on 'Next'. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;    &lt;p align="justify"&gt; In Step 2 of 2 select                      'SysTreeView32' for 'Which window class, if any, should this                      control subclass?'.  Click on 'Finish' to let the                      wizard generate the code.&lt;/p&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;  &lt;/span&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Click on the 'Class View' tab                  and in the PreCreateWindow( ) virtual function you can see the                  line   &lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt; &lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;                 cs.lpszClass = _T ( "SysTreeView32" ) ;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt; &lt;/p&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;This                  line indicates that SystreeView32 window class has been made as                  a subclass of the directory control. Hence the messages would be                  received by the control class before reaching the                  &lt;em&gt;SystreeView32&lt;/em&gt; window class. To change the style of the                  tree window we have added:&lt;/p&gt; &lt;/span&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt; &lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;cs.style |=                  TVS_HASBUTTONS | TVS_LINESATROOT | TVS_HASLINES | WS_BORDER ;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt; &lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;Next we have added an &lt;em&gt;OnCreate( )                  &lt;/em&gt;handler to the CDirCtrl class. From the &lt;em&gt;OnCreate( )                  &lt;/em&gt;handler &lt;em&gt;adddrives( )&lt;/em&gt; function has been called that                  adds drives to the &lt;em&gt;CString&lt;/em&gt; variable. This function in                  turn calls &lt;em&gt;adddriveitems( )&lt;/em&gt; to add to the tree control                  drives and a '+' against each drive. The &lt;em&gt;adddriveitems(                  )&lt;/em&gt; function uses a pointer to &lt;em&gt;CTreeView&lt;/em&gt; object to                  add items to the tree control. This pointer has been defined as                  a pubic member variable of &lt;em&gt;CDirCtrl&lt;/em&gt; class and has been                  intialised with the handle on the tree control. When we click on                  '+' sign or double click on the drive name in the tree control,                  the control tries to send a notification message to the parent                  that the item is being expanded. Since there is no parent in                  this control and we want that the control should get the                  notification we have added the following entry in the message                  map of &lt;em&gt;CDirCtrl&lt;/em&gt; class.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt; &lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;ON_NOTIFY_REFLECT ( TVN_ITEMEXPANDING, onexpanding )&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt; &lt;/p&gt; &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;This results into the &lt;em&gt;onexpanding( )                  &lt;/em&gt;function getting called whenever a notification arrives.                  This function first deletes the empty enter which was added to                  get the '+' sign. Secondly, it calls &lt;em&gt;adddir( ) &lt;/em&gt;function                  to add subdirectories of the selected drive. The sub-directories                  having more directories inside them would get '+' sign before                  them. On double clicking such sub-directories the control will                  receive the reflected notification message. Again the control                  would be transferred to the &lt;em&gt;onexpanding( ) &lt;/em&gt;function                  which will now list the sub-sub-directories of the selected                  directory. On double clicking the item or single clicking the                  '-' of the expanded directory, the control gets the reflected                  message. This time we delete all the entries under this item by                  calling the &lt;em&gt;deleteallchild( ) &lt;/em&gt;function. As we select                  item in the tree control the control fires an event to the                  container with the full path of the selected directory. To                  accomplish this an event with the name &lt;em&gt;sendpath( )&lt;/em&gt; has                  been added to the &lt;em&gt;CDirCtrl&lt;/em&gt; class. The &lt;em&gt;sendpath(                  )&lt;/em&gt; event has been fired from the handler &lt;em&gt;onSelChange( )                  &lt;/em&gt;that gets called on selection of any item. If we run this                  program the control will register itself with the Windows                  registry on that machine. A dialog box would be displayed asking                  for the exe file to be used as a container for this control. We                  can 'Microsoft's ActiveX Test Container' to display the control.                  Here we have to insert our control from the 'Insert control'                  box. The container contains of a splitter window. The upper                  window displays the control and the lower window displays the                  events generated by the control.&lt;/span&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;                &lt;/span&gt; &lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;img src="http://www.kicit.com/freebies/com/ActivexDIR.jpg" width="397" height="435" /&gt;  &lt;/span&gt;&lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000000;"&gt;&lt;a href="http://www.kicit.com/freebies/com/dir.zip"&gt;Download&lt;/a&gt;  &lt;/span&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1720414650144393494-5009688644940194402?l=activextutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://activextutorial.blogspot.com/feeds/5009688644940194402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1720414650144393494&amp;postID=5009688644940194402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/5009688644940194402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1720414650144393494/posts/default/5009688644940194402'/><link rel='alternate' type='text/html' href='http://activextutorial.blogspot.com/2008/08/activex-directory-control.html' title='ActiveX Directory Control'/><author><name>sandy</name><uri>http://www.blogger.com/profile/02503582209971047801</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
