﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-BeyondCN</title><link>http://www.cppblog.com/BeyondCN/</link><description /><language>zh-cn</language><lastBuildDate>Sat, 04 Apr 2026 07:44:03 GMT</lastBuildDate><pubDate>Sat, 04 Apr 2026 07:44:03 GMT</pubDate><ttl>60</ttl><item><title>gSoap: How to add info to SOAP Header using gSOAP(转)</title><link>http://www.cppblog.com/BeyondCN/archive/2009/03/28/78146.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Sat, 28 Mar 2009 07:29:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2009/03/28/78146.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/78146.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2009/03/28/78146.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/78146.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/78146.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="line-height: 17px; color: rgb(68, 68, 68); font-family: Tahoma; font-size: 13px; "><div id="LastMDatecns!599DFA62740F949D!542" style="line-height: 17px; ">October 09</div><h4 class="beTitle" id="subjcns!599DFA62740F949D!542" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; font-weight: normal; color: rgb(68, 68, 68); font-size: 16px; ">gSoap: How to add info to SOAP Header using gSOAP</h4><div id="msgcns!599DFA62740F949D!542" class="bvMsg" style="line-height: 17px; width: 820px; overflow-x: hidden; overflow-y: hidden; text-overflow: ellipsis; "><div style="line-height: 17px; ">gSoap: How to add info to SOAP Header using gSOAP</div><div style="line-height: 17px; ">There's some misleading info in gSOAP's official documents in SOAP Header Processing Part.&nbsp;<br style="line-height: 17px; ">This article leads you to the right way and can make your program work.</div><div style="line-height: 17px; ">The use case is:&nbsp;<br style="line-height: 17px; ">Client needs to pass user name and password to Server Side to get authenticated.<br style="line-height: 17px; ">The username and password info should be embeded in SOAP Header.</div><div style="line-height: 17px; ">Steps:<br style="line-height: 17px; ">1. Edit struct SOAP_ENV__Header in soapStub.h file which is generated by gSOAP's soapcpp2 compiler<br style="line-height: 17px; ">Add the neccesary info to this struct&nbsp;<br style="line-height: 17px; ">For example:</div><div style="line-height: 17px; ">The original one is:<br style="line-height: 17px; "><font color="#00b050" style="line-height: normal; ">struct SOAP_ENV__Header<br style="line-height: 17px; ">{<br style="line-height: 17px; ">public:<br style="line-height: 17px; ">&nbsp;void *dummy;&nbsp;/* transient */<br style="line-height: 17px; ">};<br style="line-height: 17px; "></font>This should be changed to:<br style="line-height: 17px; "><font color="#00b050" style="line-height: normal; ">struct SOAP_ENV__Header<br style="line-height: 17px; ">{<br style="line-height: 17px; ">public:<br style="line-height: 17px; ">&nbsp;void *dummy;&nbsp;/* transient */<br style="line-height: 17px; ">&nbsp;char *username;<br style="line-height: 17px; ">&nbsp;char *password;<br style="line-height: 17px; ">};</font></div><div style="line-height: 17px; ">2.&nbsp; Edit function soap_out_SOAP_ENV__Header in soapC.cpp file which is also generated by gSOAP<br style="line-height: 17px; ">Add statements to serialize those info into SOAP Header.<br style="line-height: 17px; ">For example:</div><div style="line-height: 17px; ">The original one is:<br style="line-height: 17px; "><font color="#00b050" style="line-height: normal; ">SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type)<br style="line-height: 17px; ">{<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type);<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; /* transient dummy skipped */<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap_element_end_out(soap, tag);<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; return SOAP_OK;<br style="line-height: 17px; ">}</font></div><div style="line-height: 17px; ">This could be changed to:</div><div style="line-height: 17px; "><font color="#00b050" style="line-height: normal; ">SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type)<br style="line-height: 17px; ">{<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type);<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; /* transient dummy skipped */<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap_out_string(soap, "headerNS:username", 1, &amp;(a-&gt;username), "");<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap_out_string(soap, "headerNS:password", 2, &amp;(a-&gt;password), "");</font></div><div style="line-height: 17px; "><font color="#00b050" style="line-height: normal; ">&nbsp;&nbsp;&nbsp; soap_element_end_out(soap, tag);<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; return SOAP_OK;<br style="line-height: 17px; ">}</font></div><div style="line-height: 17px; ">3. Add the namespace mapping to namespaces array in .nsmap file.<br style="line-height: 17px; ">&nbsp;<font color="#00b050" style="line-height: normal; ">{"headerNS", "</font><a href="http://customeheader.test.com/" style="line-height: 17px; font-weight: inherit; text-decoration: none; color: rgb(201, 67, 14); cursor: pointer; "><font color="#00b050" style="line-height: normal; ">http://customeheader.test.com</font></a><font color="#00b050" style="line-height: normal; ">", NULL, NULL},</font></div><div style="line-height: 17px; ">&nbsp;</div><div style="line-height: 17px; ">4. Set the header before invoking Web Service Method. This part you can also refer to the gSOAP's official document<a href="http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc12" style="line-height: 17px; font-weight: inherit; text-decoration: none; color: rgb(201, 67, 14); cursor: pointer; ">http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc12</a>.</div><div style="line-height: 17px; ">&nbsp;<font color="#00b050" style="line-height: normal; ">&nbsp; struct soap soap;&nbsp;<br style="line-height: 17px; ">&nbsp;&nbsp; soap_init(&amp;soap);&nbsp;&nbsp;<br style="line-height: 17px; ">...<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap-&gt;header = (SOAP_ENV__Header *)soap_malloc(soap, sizeof(SOAP_ENV__Header));<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap-&gt;header-&gt;username = (char*)malloc(MAX_NAME_SIZE * sizeof(char));<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap-&gt;header-&gt;password = (char*)malloc(MAX_NAME_SIZE * sizeof(char));<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; strcpy(soap-&gt;header-&gt;username, username);<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; strcpy(soap-&gt;header-&gt;password, passwd);<br style="line-height: 17px; ">&nbsp;&nbsp;&nbsp; soap_call_method(&amp;soap, ...);&nbsp; //the SOAP Header will be in the request<br style="line-height: 17px; ">...</font></div><div style="line-height: 17px; ">5. Compile<br style="line-height: 17px; ">6. Run.&nbsp;<br style="line-height: 17px; ">The SOAP Message could be<br style="line-height: 17px; "><font color="#0070c0" style="line-height: normal; ">...&nbsp;<br style="line-height: 17px; ">&lt;SOAP-ENV:Envelope xmlns:headerNS="</font><a href="http://customeheader.vpamws.com/" style="line-height: 17px; font-weight: inherit; text-decoration: none; color: rgb(201, 67, 14); cursor: pointer; "><font color="#0070c0" style="line-height: normal; ">http://customeheader.vpamws.com</font></a><font color="#0070c0" style="line-height: normal; ">"&gt;<br style="line-height: 17px; ">&lt;SOAP-ENV:Header&gt;<br style="line-height: 17px; ">&lt;headerNS:username&gt;admin&lt;/headerNS:username&gt;<br style="line-height: 17px; ">&lt;headerNS:password&gt;default&lt;/headerNS:password&gt;<br style="line-height: 17px; ">&lt;/SOAP-ENV:Header&gt;<br style="line-height: 17px; ">&lt;SOAP-ENV:Body&gt;&nbsp;<br style="line-height: 17px; ">...&nbsp;<br style="line-height: 17px; ">&lt;/SOAP-ENV:Body&gt;&nbsp;<br style="line-height: 17px; ">&lt;/SOAP-ENV:Envelope&gt;</font></div><div style="line-height: 17px; "><font color="#0070c0" style="line-height: normal; "></font>&nbsp;</div><div style="line-height: 17px; "><font color="#000000" style="line-height: normal; ">Any Questions, Please let me know. Thanks.</font></div><div style="line-height: 17px; "><font color="#000000" style="line-height: normal; "></font>&nbsp;</div><div style="line-height: 17px; "><font color="#000000" style="line-height: normal; ">-Debora</font></div></div></span>
<img src ="http://www.cppblog.com/BeyondCN/aggbug/78146.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2009-03-28 15:29 <a href="http://www.cppblog.com/BeyondCN/archive/2009/03/28/78146.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何创建虚拟软驱</title><link>http://www.cppblog.com/BeyondCN/archive/2009/03/21/77392.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Sat, 21 Mar 2009 05:18:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2009/03/21/77392.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/77392.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2009/03/21/77392.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/77392.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/77392.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="color: rgb(75, 75, 75); font-family: georgia; font-size: 13px; line-height: 20px; "><div class="postTitle" style="font-size: 14.2px; font-weight: bold; margin-top: 0px; padding-top: 0px; margin-bottom: 15px; "><a id="AjaxHolder_ctl01_TitleUrl" class="postTitle2" href="http://www.cnblogs.com/AlphaWu/archive/2007/06/19/789005.html" style="text-decoration: none; margin-top: 0px; padding-top: 0px; color: rgb(99, 143, 39); ">如何创建虚拟软驱？</a></div><p style="margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; ">1.subst.exe焕发青春&nbsp;<br>subst.exe是一个不太常用的DOS命令，它的位置隐藏在\Windows\Command\下(针对Windows 9X/Me系统)，如果是Windows 2000/XP，则应该隐藏在\Windows\System32\下，前者的大小为17.6KB，后者的大小更小一些，才9.0KB而已。&nbsp;<br>subst.exe的完整名称是&#8220;给目录赋驱动器符命令&#8221;，它的功能是以磁盘驱动器号代替路径名称，以使驱动器号与指定的子目录路径关联，其命令格式很简单：&nbsp;<br>subst.exe [Driver1: [Driver2:] Path]&nbsp;<br>其中的&#8220;Driver1&#8221;是指定指派路径的虚拟驱动器盘符，&#8220;Driver2 Path&#8221;则是指定物理驱动器和要指派给虚拟驱动器的路径。&nbsp;<br>2.利用subst.exe虚拟软驱&nbsp;<br>例如，在安装瑞星杀毒软件前，你可以先通过其他方式(例如局域网、邮件、共享文件)将A盘的所有文件复制到本机的一个文件夹中，例如D:\temp下。然后在命令提示符窗口下键入如下命令&#8220;subst A: D:\temp&#8221;，如图1所示，朋友们可以看一看这里用&#8220;dir A:&#8221;命令后的文件列表，就知道一张软盘中是绝不可能放入如此之多的东东的。这样，我们就可以按照这种方法将D:\temp文件夹虚拟成A盘，瑞星杀毒软件的安装就可以顺利完成了。&nbsp;<br>当我们虚拟软驱后，你会发觉软驱的图标已经变成了图2所示的硬盘图标，当然双击打开后就是D:\Temp文件夹中的内容。&nbsp;<br>3.删除虚拟软驱&nbsp;<br>如果你要删除这个虚拟出来的A盘，只要执行&#8220;subst A:/D&#8221;命令就行了，切记工作结束后一定要及时删除这个虚拟出来的A盘，否则无法正常使用原来的物理A盘哟。&nbsp;<br>有些软件只能在软盘上运行，这是软件开发者的特别设计，主要目的是为了防止非法拷贝。不过，我们可以先通过HD-COPY工具将软盘做成一个扩展名为img的镜像文件存放在硬盘上的某个文件夹中，然后利用IMGDRIVE、UNDISK等工具软件将该镜像文件展开，这样就可以在硬盘上创建一个虚拟软盘，自然也就可以正常运行了，不过如果是加密的软件，则无法通过这种方法正常运行。</p></span>
<img src ="http://www.cppblog.com/BeyondCN/aggbug/77392.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2009-03-21 13:18 <a href="http://www.cppblog.com/BeyondCN/archive/2009/03/21/77392.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SECTOR, TRACK AND CLUSTER</title><link>http://www.cppblog.com/BeyondCN/archive/2009/03/19/77121.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Thu, 19 Mar 2009 02:20:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2009/03/19/77121.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/77121.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2009/03/19/77121.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/77121.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/77121.html</trackback:ping><description><![CDATA[
<span class="Apple-style-span" style="font-family: verdana; border-collapse: collapse; font-size: 11px; "><table class="mn_cnt" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; width: 603px; "><tbody><tr><td class="mn_hdr" style="width: 603px; height: 21px; background-image: url(http://www.helpwithpcs.com/img/cnt_hdr.gif); background-repeat: no-repeat; font-family: verdana, serif; font-size: 8pt; color: rgb(255, 255, 255); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><h1 style="font-family: arial, serif; font-size: 10pt; color: rgb(255, 255, 255); font-weight: bold; margin-top: 0px; margin-bottom: 0px; ">Sector, Boot Sector, Track, Cluster, Bad Sector, Lost Cluster</h1></td></tr></tbody></table><table class="mn_cnt" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; width: 603px; "><tbody><tr><td class="mn_cnt_1" style="background-color: rgb(255, 255, 255); font-family: verdana, serif; font-size: 8pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><table class="tbmn"><tbody><tr><td class="hws" width="30" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img src="http://www.helpwithpcs.com/jargon/img/sector-track-cluster.gif" width="140" height="110" alt="Sector, Track and Cluster" border="0"></td><td class="cnt2" style="font-family: verdana, serif; font-size: 10pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><h2 style="font-family: arial, serif; font-size: 10pt; color: rgb(153, 0, 0); font-weight: bold; margin-top: 3px; margin-bottom: 3px; ">Sector, Track and Cluster</h2>A Sector in the context of computing refers to a small area of a storage device, for example a hard disk drive.&nbsp;<br>For more detailed information please see below.</td></tr></tbody></table><img src="http://www.helpwithpcs.com/img/hr.gif" width="588" height="9" alt="spr"><br><table class="tbmn"><tbody><tr><td class="maincell" width="172" align="center" style="font-family: verdana, serif; font-size: 8pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><span id="atbc77a195b3da8c5"><a href="http://www.addthis.com/bookmark.php?v=120&amp;winname=addthis&amp;pub=hwsadd&amp;s=&amp;url=http%3A%2F%2Fwww.helpwithpcs.com%2Fjargon%2Fsector-track-cluster.htm&amp;title=Sector%2C%20Boot%20Sector%2C%20Track%2C%20Cluster%2C%20Bad%20Sector%2C%20Lost%20Cluster&amp;logo=&amp;logobg=&amp;logocolor=&amp;ate=AT-hwsadd/-/-/c77a1956f0841d/1/4932819a39a249db&amp;adt=undefined&amp;content=&amp;CXNID=2000001.5215456080540439074NXC" onmouseover="return addthis_open(this, 'share', 'http://www.helpwithpcs.com/jargon/sector-track-cluster.htm', 'Sector, Boot Sector, Track, Cluster, Bad Sector, Lost Cluster')" onmouseout="addthis_close()" onclick="return addthis_to()" class="snap_noshots" style="color: rgb(0, 0, 0); text-decoration: underline; "><img src="http://s7.addthis.com/button1-bm.gif" width="125" height="16" alt="AddThis" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "></a></span></td><td class="maincell" align="right" style="font-family: verdana, serif; font-size: 8pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><font color="#ba1622"><strong>This page is&nbsp;<font color="#ba1622"><strong>&#169;&nbsp;<a href="http://www.helpwithpcs.com/privacypolicy.htm#copyright" target="_blank" style="color: rgb(0, 0, 0); text-decoration: underline; ">Copyright</a>&nbsp;2001-2008 helpwithpcs.com</strong></font></strong></font></td></tr></tbody></table><img src="http://www.helpwithpcs.com/img/hr.gif" width="588" height="9" alt="spr"><br><table class="stand" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: 597px; "><tbody><tr><td class="cnt2" style="font-family: verdana, serif; font-size: 10pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><h2 style="font-family: arial, serif; font-size: 10pt; color: rgb(153, 0, 0); font-weight: bold; margin-top: 3px; margin-bottom: 3px; ">Sector, Track and Cluster continued...</h2>A typical hard disk drive when low-level formatted is split into tracks, sectors and clusters:<ul style="margin-top: 5px; margin-bottom: 5px; "><li style="margin-top: 3px; margin-bottom: 3px; ">Tracks are concentric circles around the disk.</li><li style="margin-top: 3px; margin-bottom: 3px; ">Sectors are segments of a track.</li><li style="margin-top: 3px; margin-bottom: 3px; ">Clusters are a set of sectors.</li></ul><br></td><td class="hws" width="280" align="center" valign="top" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><ins style="display: inline-table; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; height: 200px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: relative; visibility: visible; width: 200px; "><ins style="display: block; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; height: 200px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: relative; visibility: visible; width: 200px; "><iframe allowtransparency="true" frameborder="0" height="200" hspace="0" id="google_ads_frame2" marginheight="0" marginwidth="0" name="google_ads_frame" scrolling="no" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-7821244969182905&amp;dt=1237428183576&amp;prev_slotnames=3702604494&amp;output=html&amp;slotname=8105675827&amp;correlator=1237428182995&amp;url=http%3A%2F%2Fwww.helpwithpcs.com%2Fjargon%2Fsector-track-cluster.htm&amp;ref=http%3A%2F%2Fwww.google.cn%2Fsearch%3Fhl%3Dzh-CN%26newwindow%3D1%26q%3Dsectors%2Btracks%26btnG%3DGoogle%2B%25E6%2590%259C%25E7%25B4%25A2%26meta%3D%26aq%3Df%26oq%3D&amp;frm=0&amp;ga_vid=266702169.1237428183&amp;ga_sid=1237428183&amp;ga_hid=52122668&amp;flash=9.0.47&amp;u_h=800&amp;u_w=1280&amp;u_ah=736&amp;u_aw=1280&amp;u_cd=32&amp;u_tz=480&amp;u_his=1&amp;u_java=true&amp;u_nplug=21&amp;u_nmime=79&amp;dtd=5&amp;w=200&amp;h=200&amp;xpc=yL7i9U1Vq0&amp;p=http%3A//www.helpwithpcs.com" vspace="0" width="200" style="left: 0px; position: absolute; top: 0px; "></iframe></ins></ins></td></tr></tbody></table><table class="stand" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: 597px; "><tbody><tr><td class="hws" width="280" align="center" valign="top" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><img border="0" src="http://www.helpwithpcs.com/jargon/track-sector-example.gif" width="271" height="173" alt="Sector, track and cluster example"></td><td class="cnt2" style="font-family: verdana, serif; font-size: 10pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><br>In the example on the left in&nbsp;<strong>fig 1.1</strong>&nbsp;we have only illustrated one track, one sector and one cluster, but you can see where the other tracks, sectors and clusters would reside.&nbsp;<br><br>A typical hard drive may have 30 or more tracks, and 10 or more sectors per track.&nbsp;<br><br>The size of a cluster will vary depending on the size of the partition.</td></tr></tbody></table><table class="stand" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: 597px; "><tbody><tr><td class="cnt2" style="font-family: verdana, serif; font-size: 10pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><br><h2 style="font-family: arial, serif; font-size: 10pt; color: rgb(153, 0, 0); font-weight: bold; margin-top: 3px; margin-bottom: 3px; ">Bad Sector</h2>A bad sector refers to a single sector that has some physical flaw. Although a disk can operate with a bad sector, any data that was stored in that sector will be lost, further, no data can be written to that sector.&nbsp;<br><h2 style="font-family: arial, serif; font-size: 10pt; color: rgb(153, 0, 0); font-weight: bold; margin-top: 3px; margin-bottom: 3px; ">Lost Cluster</h2>A lost cluster is a cluster that the operating system has classed as being in use, but actually contains no data. The ScanDisk utility within Windows is designed to search for lost clusters and make them available to the file system again.&nbsp;<br><br></td></tr></tbody></table><table class="stand" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: 597px; "><tbody><tr><td class="cnt2" style="font-family: verdana, serif; font-size: 10pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><h2 style="font-family: arial, serif; font-size: 10pt; color: rgb(153, 0, 0); font-weight: bold; margin-top: 3px; margin-bottom: 3px; ">The Boot Process and the boot sector</h2>Boot sector refers to a single sector (normally the first in the active partition) that contains the code to boot the operating system.&nbsp;<br><br>Before the boot sector is read, the computer's bios will call a small program called an&nbsp;<strong>MBR</strong>&nbsp;(Master Boot Record), which normally resides in the first record of the first disk.&nbsp;<br><br>The&nbsp;<strong>MBR</strong>&nbsp;will query the&nbsp;<a href="http://www.helpwithpcs.com/jargon/fat.htm" style="color: rgb(0, 0, 0); text-decoration: underline; ">FAT</a>&nbsp;(File Allocation Table) to establish the primary partition and then pass control over to the boot sector of that partition.&nbsp;<br></td><td class="hws" width="220" align="center" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><ins style="display: inline-table; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; height: 200px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: relative; visibility: visible; width: 200px; "><ins style="display: block; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; height: 200px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: relative; visibility: visible; width: 200px; "><iframe allowtransparency="true" frameborder="0" height="200" hspace="0" id="google_ads_frame3" marginheight="0" marginwidth="0" name="google_ads_frame" scrolling="no" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-7821244969182905&amp;dt=1237428183609&amp;prev_slotnames=3702604494%2C8105675827&amp;output=html&amp;slotname=8105675827&amp;correlator=1237428182995&amp;url=http%3A%2F%2Fwww.helpwithpcs.com%2Fjargon%2Fsector-track-cluster.htm&amp;ref=http%3A%2F%2Fwww.google.cn%2Fsearch%3Fhl%3Dzh-CN%26newwindow%3D1%26q%3Dsectors%2Btracks%26btnG%3DGoogle%2B%25E6%2590%259C%25E7%25B4%25A2%26meta%3D%26aq%3Df%26oq%3D&amp;frm=0&amp;ga_vid=266702169.1237428183&amp;ga_sid=1237428183&amp;ga_hid=52122668&amp;flash=9.0.47&amp;u_h=800&amp;u_w=1280&amp;u_ah=736&amp;u_aw=1280&amp;u_cd=32&amp;u_tz=480&amp;u_his=1&amp;u_java=true&amp;u_nplug=21&amp;u_nmime=79&amp;dtd=4&amp;w=200&amp;h=200&amp;xpc=ElxdGISa7J&amp;p=http%3A//www.helpwithpcs.com" vspace="0" width="200" style="left: 0px; position: absolute; top: 0px; "></iframe></ins></ins></td></tr></tbody></table><table class="stand" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: 597px; "><tbody><tr><td class="cnt2" style="font-family: verdana, serif; font-size: 10pt; color: rgb(0, 0, 0); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; "><br>The small program stored in the boot sector is then executed and the operating system will begin to load.</td></tr></tbody></table><img src="http://www.helpwithpcs.com/img/hr.gif" width="588" height="9" alt="spr"></td></tr></tbody></table></span><img src ="http://www.cppblog.com/BeyondCN/aggbug/77121.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2009-03-19 10:20 <a href="http://www.cppblog.com/BeyondCN/archive/2009/03/19/77121.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>托管与非托管代码之间的相互调用</title><link>http://www.cppblog.com/BeyondCN/archive/2008/11/14/66895.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Fri, 14 Nov 2008 03:40:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2008/11/14/66895.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/66895.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2008/11/14/66895.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/66895.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/66895.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/BeyondCN/archive/2008/11/14/66895.html'>阅读全文</a><img src ="http://www.cppblog.com/BeyondCN/aggbug/66895.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2008-11-14 11:40 <a href="http://www.cppblog.com/BeyondCN/archive/2008/11/14/66895.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CLI/C++中混合类的使用（转）</title><link>http://www.cppblog.com/BeyondCN/archive/2008/11/08/66321.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Sat, 08 Nov 2008 05:26:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2008/11/08/66321.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/66321.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2008/11/08/66321.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/66321.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/66321.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/BeyondCN/archive/2008/11/08/66321.html'>阅读全文</a><img src ="http://www.cppblog.com/BeyondCN/aggbug/66321.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2008-11-08 13:26 <a href="http://www.cppblog.com/BeyondCN/archive/2008/11/08/66321.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>.net中的 delegate的标准C++模拟(转)</title><link>http://www.cppblog.com/BeyondCN/archive/2008/11/07/66183.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Thu, 06 Nov 2008 16:24:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2008/11/07/66183.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/66183.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2008/11/07/66183.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/66183.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/66183.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/BeyondCN/archive/2008/11/07/66183.html'>阅读全文</a><img src ="http://www.cppblog.com/BeyondCN/aggbug/66183.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2008-11-07 00:24 <a href="http://www.cppblog.com/BeyondCN/archive/2008/11/07/66183.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ISO C++实现 类似 C#的 Delegate</title><link>http://www.cppblog.com/BeyondCN/archive/2008/11/06/66180.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Thu, 06 Nov 2008 15:29:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2008/11/06/66180.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/66180.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2008/11/06/66180.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/66180.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/66180.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/BeyondCN/archive/2008/11/06/66180.html'>阅读全文</a><img src ="http://www.cppblog.com/BeyondCN/aggbug/66180.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2008-11-06 23:29 <a href="http://www.cppblog.com/BeyondCN/archive/2008/11/06/66180.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++/CLI 中字符串类型的转化:  std::string和System::String的相互转换</title><link>http://www.cppblog.com/BeyondCN/archive/2008/11/06/66145.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Thu, 06 Nov 2008 09:31:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2008/11/06/66145.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/66145.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2008/11/06/66145.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/66145.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/66145.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/BeyondCN/archive/2008/11/06/66145.html'>阅读全文</a><img src ="http://www.cppblog.com/BeyondCN/aggbug/66145.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2008-11-06 17:31 <a href="http://www.cppblog.com/BeyondCN/archive/2008/11/06/66145.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在 .Net 中实现自定义事件（转）</title><link>http://www.cppblog.com/BeyondCN/archive/2008/11/03/65798.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Sun, 02 Nov 2008 16:58:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2008/11/03/65798.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/65798.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2008/11/03/65798.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/65798.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/65798.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在 .Net 中实现自定义事件&#160;　　.Net 中的自定义事件，其实是利用委托实现，大概可以分为以下几个步骤：1、定义事件传送的 EventArgs ，当然也可以直接使用系统的 EventArgs。2、定义该事件类型的委托。3、定义事件的处理方法。4、在需要的地方抛出事件，抛出的事件会在外部被捕捉到。我们以一个简单的计算程序为例讲解，该程序实现计算两个给定数字的和，当结果&lt;=100时...&nbsp;&nbsp;<a href='http://www.cppblog.com/BeyondCN/archive/2008/11/03/65798.html'>阅读全文</a><img src ="http://www.cppblog.com/BeyondCN/aggbug/65798.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2008-11-03 00:58 <a href="http://www.cppblog.com/BeyondCN/archive/2008/11/03/65798.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 使用Delegate类型设计自定义事件（转）</title><link>http://www.cppblog.com/BeyondCN/archive/2008/11/03/65797.html</link><dc:creator>BeyondCN</dc:creator><author>BeyondCN</author><pubDate>Sun, 02 Nov 2008 16:55:00 GMT</pubDate><guid>http://www.cppblog.com/BeyondCN/archive/2008/11/03/65797.html</guid><wfw:comment>http://www.cppblog.com/BeyondCN/comments/65797.html</wfw:comment><comments>http://www.cppblog.com/BeyondCN/archive/2008/11/03/65797.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/BeyondCN/comments/commentRss/65797.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/BeyondCN/services/trackbacks/65797.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &#160;使用Delegate类型设计自定义事件作者：罗会涛&#160;&#160;&#160; 在C#编程中，除了Method和Property，任何Class都可以有自己的事件（Event）。定义和使用自定义事件的步骤如下：&#160;（1）在Class之外定义一个delegate类型，用于确定事件程序的接口&#160;&#160;&#160;（2）在Class内部，声明一个public e...&nbsp;&nbsp;<a href='http://www.cppblog.com/BeyondCN/archive/2008/11/03/65797.html'>阅读全文</a><img src ="http://www.cppblog.com/BeyondCN/aggbug/65797.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/BeyondCN/" target="_blank">BeyondCN</a> 2008-11-03 00:55 <a href="http://www.cppblog.com/BeyondCN/archive/2008/11/03/65797.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>