<?xml version="1.0" encoding="GBK"?>
<?xml-stylesheet href="/style/rss.css" type="text/css"?>
<rss version="2.0" xmlns:eb="http://blog.tom.com/">
<channel>
  <title>d_z_x_y</title>
  <link>http://blog.tom.com/d_z_x_y</link>
  <description><![CDATA[comehere ]]></description>
  <language>zh</language>
  <generator>newblog.tom.com RSS</generator>
  <pubDate></pubDate>    <item>
		<title><![CDATA[ C# WebService Client ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/1302.html</link>
		<description><![CDATA[ <p><font size="2"><font face="Trebuchet MS"><font color="#008000">/// wsdl /l:CS /protocol:SOAP http://localhost/OIDServer/OIDServer.asmx?WSDL<br>
/// wsdl /l:CS /protocol:HttpGet http://localhost/OIDServer/OIDServer.asmx?WSDL</font><br>
<font color="#008000">/// wsdl /l:CS /protocol:HttpPost <a href="http://localhost/OIDServer/OIDServer.asmx?WSDL">http://localhost/OIDServer/OIDServer.asmx?WSDL</a></font></font></font></p>
<p>&nbsp;</p>
<p><font face="Trebuchet MS" color="#008000" size="2">[Reference]</font></p>
<p><a href="http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html">http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html</a></p> ]]></description>
		<eb:creationDate>2007-12-15 14:02:56</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ JavaScript communicate with WebService 2(webservice.htc) ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/1301.html</link>
		<description><![CDATA[ <p>[Examples]1</p>
<p>&lt;html&gt;&lt;head&gt;<br>
&lt;script language=JavaScript&gt;<br>
var iCallID;</p>
<p>function removeAllOptions(selectbox)<br>
{<br>
&nbsp;var i;<br>
&nbsp;for( i = selectbox.options.length - 1; i &gt;= 0; i-- )<br>
&nbsp;{<br>
&nbsp;&nbsp;selectbox.remove(i);<br>
&nbsp;}<br>
}</p>
<p>function addOption(selectbox, value, text)<br>
{<br>
&nbsp;var optn&nbsp;&nbsp; = document.createElement("OPTION");<br>
&nbsp;optn.text&nbsp; = text;<br>
&nbsp;optn.value = value;<br>
&nbsp;<br>
&nbsp;selectbox.options.add(optn);<br>
&nbsp;<br>
}</p>
<p>function init()<br>
{<br>
&nbsp;service.useService("<a href='http://localhost/FTHWS/Service.asmx?WSDL","Service'>http://localhost/FTHWS/Service.asmx?WSDL","Service</a>");<br>
&nbsp;iCallID = service.Service.callService("GetPIPoints");<br>
}</p>
<p>function onWSresult()<br>
{&nbsp;<br>
&nbsp;&nbsp;&nbsp; if((event.result.error)&amp;&amp;(iCallID==event.result.id))&nbsp;<br>
&nbsp;{&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;var xfaultcode = event.result.errorDetail.code;<br>
&nbsp;&nbsp;var xfaultstring = event.result.errorDetail.string;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;var xfaultsoap = event.result.errorDetail.raw;<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;// Add code to output error information here<br>
&nbsp;}<br>
&nbsp;else<br>
&nbsp;{<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; for( var i = 0; i &lt; event.result.value.length; i++ )<br>
&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;//alert(event.result.value[i]);<br>
&nbsp;&nbsp;&nbsp;addOption(slPoints, event.result.value[i], event.result.value[i]);<br>
&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;//alert("The method returned the result : " + event.result.value);<br>
&nbsp;}<br>
}</p>
<p>function EndDialog(val){<br>
&nbsp;var retVal = new Array();<br>
&nbsp;if(val=="OK")<br>
&nbsp;{<br>
&nbsp;&nbsp;retVal[0] = "ab";<br>
&nbsp;&nbsp;retVal[1] = "abc";<br>
&nbsp;&nbsp;retVal[2] = "abcd";<br>
&nbsp;}<br>
&nbsp;<br>
&nbsp;if (document.all) { //IE4 and up<br>
&nbsp;&nbsp;window.returnValue = retVal;<br>
&nbsp;}<br>
&nbsp;else if (document.layers)<br>
&nbsp;{<br>
&nbsp;}<br>
&nbsp;else if (document.getElementById)<br>
&nbsp;&nbsp;&nbsp; { //mozilla<br>
&nbsp;&nbsp;&nbsp;<br>
&nbsp;}<br>
&nbsp;if(window.opener){<br>
&nbsp;}</p>
<p>&nbsp;window.close();<br>
}<br>
&lt;/script&gt;</p>
<p>&lt;/head&gt;<br>
&lt;body onload=init()&gt;<br>
&lt;div id=service style="BEHAVIOR: url(webservice.htc)" onresult="onWSresult()"&gt;&lt;/div&gt;<br>
&lt;p&gt;<br>
&lt;select size="10" name="slPoints" multiple id="slPoints" style="WIDTH:400px;HEIGHT:380px"&gt;&lt;/select&gt; &lt;/p&gt;<br>
&lt;p&gt;<br>
&nbsp;&lt;input id=btnOK type=button value=OK onClick=EndDialog('OK')&gt;<br>
&nbsp;&lt;input id=btnCancel type=button value=Cancel&gt;&lt;/p&gt;<br>
&lt;/body&gt;&lt;/html&gt;<br></p>
<p>&nbsp;</p> ]]></description>
		<eb:creationDate>2007-12-15 13:58:23</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ JavaScripts communicate with WebServices ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/1295.html</link>
		<description><![CDATA[ <p>[Example1]</p>
<p>var xmlRequest = new ActiveXObject("Msxml2.XMLHTTP");<br>
&nbsp;<br>
&nbsp;xmlRequest.open("POST", "<a href="http://apcndaewchen1/FTHSEWebService/Service.asmx">http://apcndaewchen1/FTHSEWebService/Service.asmx</a>", false);<br>
&nbsp;xmlRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");<br>
&nbsp;xmlRequest.setRequestHeader("SOAPAction", "<a href="http://apcndaewchen5/GetPIServerList">http://apcndaewchen5/GetPIServerList</a>");<br>
&nbsp;<br>
&nbsp;xmlRequest.send('&lt;?xml version="1.0" encoding="utf-8"?&gt;'<br>
&nbsp;&nbsp;'&lt;soap:Envelope xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:soap="<a href="http://schemas.xmlsoap.org/soap/envelope/&quot;'">http://schemas.xmlsoap.org/soap/envelope/"&gt;'</a><br>
&nbsp;&nbsp;'&lt;soap:Body&gt;'<br>
&nbsp;&nbsp;'&lt;GetPIServerList xmlns="<a href="http://apcndaewchen5/">http://apcndaewchen5/</a>" /&gt;'<br>
&nbsp;&nbsp;'&lt;/soap:Body&gt;'<br>
&nbsp;&nbsp;'&lt;/soap:Envelope&gt;');<br>
&nbsp;<br>
&nbsp;if( xmlRequest.status == 200 )<br>
&nbsp;{<br>
&nbsp;&nbsp;alert(xmlRequest.responseXML);<br>
&nbsp;}</p>
<p><br>
&nbsp;var xmlRequest = new ActiveXObject("Msxml2.XMLHTTP");<br>
&nbsp;<br>
&nbsp;xmlRequest.open("POST", "<a href="http://apcndaewchen1/FTHSEWebService/Service.asmx">http://apcndaewchen1/FTHSEWebService/Service.asmx</a>", false);<br>
&nbsp;xmlRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");<br>
&nbsp;xmlRequest.setRequestHeader("SOAPAction", "<a href="http://apcndaewchen5/GetPIServerList">http://apcndaewchen5/GetPIServerList</a>");<br>
&nbsp;<br>
&nbsp;xmlRequest.send('&lt;?xml version="1.0" encoding="utf-8"?&gt;'+<br>
&nbsp;&nbsp;'&lt;soap:Envelope xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:soap="<a href="http://schemas.xmlsoap.org/soap/envelope/&quot;'">http://schemas.xmlsoap.org/soap/envelope/"&gt;'</a>+<br>
&nbsp;&nbsp;'&lt;soap:Body&gt;'+<br>
&nbsp;&nbsp;'&lt;GetPIServerList xmlns="<a href="http://apcndaewchen5/">http://apcndaewchen5/</a>" /&gt;'+<br>
&nbsp;&nbsp;'&lt;/soap:Body&gt;'+<br>
&nbsp;&nbsp;'&lt;/soap:Envelope&gt;');<br>
&nbsp;<br>
&nbsp;if( xmlRequest.status == 200 )<br>
&nbsp;{<br>
&nbsp;&nbsp;//alert(xmlRequest.responseXML.xml);<br>
&nbsp;&nbsp;var nodes = xmlRequest.responseXML.getElementsByTagName("GetPIServerListResult");<br>
&nbsp;&nbsp;for(var i = 0; i &lt; nodes.length; i++ )<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;node = nodes[i];<br>
&nbsp;&nbsp;&nbsp;for( var j = 0; j &lt; node.getElementsByTagName("anyType").length; j++&nbsp; )<br>
&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;if( node.getElementsByTagName("anyType")[j].firstChild !== null )<br>
&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nodeValue = node.getElementsByTagName("anyType")[j].firstChild.nodeValue;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(nodeValue);<br>
&nbsp;&nbsp;&nbsp;&nbsp;}<br>
&nbsp;&nbsp;&nbsp;}<br>
&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;}<br>
&nbsp;}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>[Example2]</p>
<p>function Button1_onclick() {</p>
<p>&nbsp;var xmlRequest = new ActiveXObject("Msxml2.XMLHTTP");<br>
&nbsp;<br>
&nbsp;xmlRequest.open("POST", "<a href="http://apcndaewchen1/FTHSEWebService/Service.asmx">http://apcndaewchen1/FTHSEWebService/Service.asmx</a>", false);<br>
&nbsp;xmlRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");<br>
&nbsp;xmlRequest.setRequestHeader("SOAPAction", "<a href="http://apcndaewchen5/GetPIServerList">http://apcndaewchen5/GetPIServerList</a>");<br>
&nbsp;<br>
&nbsp;xmlRequest.send('&lt;?xml version="1.0" encoding="utf-8"?&gt;'+<br>
&nbsp;&nbsp;'&lt;soap:Envelope xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:soap="<a href="http://schemas.xmlsoap.org/soap/envelope/&quot;'">http://schemas.xmlsoap.org/soap/envelope/"&gt;'</a>+<br>
&nbsp;&nbsp;'&lt;soap:Body&gt;'+<br>
&nbsp;&nbsp;'&lt;GetPIServerList xmlns="<a href="http://apcndaewchen5/">http://apcndaewchen5/</a>" /&gt;'+<br>
&nbsp;&nbsp;'&lt;/soap:Body&gt;'+<br>
&nbsp;&nbsp;'&lt;/soap:Envelope&gt;');<br>
&nbsp;<br>
&nbsp;if( xmlRequest.status == 200 )<br>
&nbsp;{<br>
&nbsp;&nbsp;//alert(xmlRequest.responseXML.xml);<br>
&nbsp;&nbsp;var nodes = xmlRequest.responseXML.getElementsByTagName("anyType");<br>
&nbsp;&nbsp;for(var i = 0; i &lt; nodes.length; i++ )<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;node = nodes[i];<br>
&nbsp;&nbsp;&nbsp;alert(node.text);<br>
&nbsp;&nbsp;}<br>
&nbsp;}<br>
}</p> ]]></description>
		<eb:creationDate>2007-12-15 09:47:14</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ 垃圾的SQL Server Reporting Service ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/1288.html</link>
		<description><![CDATA[ <p>&lt;Query&gt;<br>
&nbsp;&nbsp; &lt;Method Name="GetAppState"&nbsp; Namespace="<a href='http://tempuri.org/"/'>http://tempuri.org/"/</a>&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;SoapAction&gt;http://tempuri.org/GetAppState&lt;/SoapAction&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Parameters&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Parameter Name="nValue"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DefaultValue&gt;1&lt;/DefaultValue&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Parameter&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Parameters&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;ElementPath IgnoreNamespace="true"&gt;*&lt;/ElementPath&gt;<br>
&lt;/Query&gt;</p>
<p>&nbsp;</p>
<p>微软的Reporting Service 还真是垃圾，经常crash 不说，他的XML provider 简直垃圾透顶了。</p>
<p>&lt;Query&gt;<br>
&nbsp;&nbsp; &lt;Method Name="GetAppState"&nbsp; Namespace="<a href='http://tempuri.org"/'>http://tempuri.org"/</a>&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;SoapAction&gt;http://tempuri.org/GetAppState&lt;/SoapAction&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Parameters&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Parameter Name="nValue"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DefaultValue&gt;1&lt;/DefaultValue&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Parameter&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Parameters&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;ElementPath IgnoreNamespace="true"&gt;*&lt;/ElementPath&gt;<br>
&lt;/Query&gt;</p>
<p>&nbsp;</p>
<p>这段code就比例子1少了一个/ 结果我调试一天没有结果。也没有任何错误提示。 真是服了微软了。</p>
<p>&nbsp;</p>
<p>&nbsp;</p> ]]></description>
		<eb:creationDate>2007-12-06 18:11:49</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ Unreg shell component ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/1273.html</link>
		<description><![CDATA[ regsvr32 /u /s %SystemRoot%\system32\SHELL32.dll<br>
regsvr32 /u /s %SystemRoot%\system32\wshom.ocx<br>
regsvr32 /u /s %SystemRoot%\system32\scrrun.dll ]]></description>
		<eb:creationDate>2007-11-16 17:53:20</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ 奇妙的bug ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/1272.html</link>
		<description><![CDATA[ <p>&nbsp; 最近一直忙于一个新的project的开发。新产品当然有很多bug了，其中有两个让我最难忘的bug。</p>
<p>其中一个是在point discovery 过程中，有个取消的button.在取消的过程中会弹出个dialog ，让</p>
<p>你选择continue, stop, cancel，这样的功能。写完这个功能一切工作正常。一天，我在point discovery 的过程成中，连续点击取消button大约20次，程序没响应了<img alt="" src="http://blog.tom.com/images/face/05.png">。 我在程序中调用的</p>
<p>&nbsp;&nbsp;&nbsp; HANDLE hThread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, m_dwID);</p>
<p>&nbsp;&nbsp;&nbsp; if( hThread != NULL )<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( SuspendThread( hThread ) == -1 )<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DWORD dw = GetLastError();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CloseHandle(hThread);<br>
&nbsp;&nbsp;&nbsp; }</p>
<p>SuspendThread 经过多次调用没有任何反映就挂了。 看来能经过重复100次不挂的程序，才算合格的程序啊。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>牛头bug， 修改了一段code, 让测试帮我test 一下。在实验室里和Bruce边聊天边测试。 这时他正玩着一个牛头挂链。一不小心掉到键盘上了，正在运行的SE 迅速的重桌面消失了。世界真奇怪！！！！！！。</p>
<p>为了重复这个问题，我把所以键盘都按边了，也没重现。第二天被我发现了重现的步骤。偶然的事件就可能让程序crash掉。</p>
<p>&nbsp;</p> ]]></description>
		<eb:creationDate>2007-11-15 10:26:54</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ 数据库恢复 ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/222.html</link>
		<description><![CDATA[ <BR>use master <br />go <br />sp_configure 'allow updates',1 <br />go <br />reconfigure with override <br />go <BR>update sysdatabases set status=-32768 where dbid=DB_ID('xx') <BR>dbcc rebuild_log('xx','C:Program FilesMicrosoft SQL ServerMSSQLDataxx_log.ldf') <BR>sp_dboption 'xx','dbo use only','false'<BR>sp_configure 'allow updates',0 <br />go <br />reconfigure with override <br />go  ]]></description>
		<eb:creationDate>2006-11-03 08:48:39</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ 随即分布 ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/221.html</link>
		<description><![CDATA[ <BR><br />--select a, b, c, d, e from aacsv<br />DECLARE Cur scroll cursor for select a, b, c, d, e from aacsv<BR>Declare @n int<br />DECLARE @i int<br />DECLARE @a int<br />DECLARE @b int<br />DECLARE @c int<br />DECLARE @d int<br />DECLARE @e int<BR>set @n = 0<BR>--set @Cur = cursor for<br />&nbsp;--select a, b, c, d, e from aacsv<br />open Cur<BR><br />while @n &lt;= 12649<br />begin<br />&nbsp;SET @i = rand()* 12649<br />&nbsp;Fetch ABSOLUTE @i&nbsp; From Cur Into @a, @b, @c, @d, @e<br />&nbsp;<br />&nbsp;--print @i + ' ' + @a + ' ' + @b + ' ' <a href="mailto:+@c">+@c</a> + ' ' <a href="mailto:+@d+'">+@d+'</a> <a href="mailto:'+@e">'+@e</a><br />&nbsp;insert into aaRand values(@a, @b, @c, @d, @e)<br />&nbsp;set @n = @n + 1<br />end<BR>Close Cur<br />Deallocate Cur<BR>&nbsp; ]]></description>
		<eb:creationDate>2006-11-02 16:55:49</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ Get File ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/220.html</link>
		<description><![CDATA[ <BR>set Sourc=F:Tools*.*<br />set Des=F:Toolsdd<BR>IF "%1" == "" del cDate.date<br />IF "%1" == "" date /T &gt;&gt; cDate.date<br />IF "%1" == "" for /F "tokens=1,2,3,* delims=/ " %%i in (cDate.date) do xcopy %Sourc% %Des% /D:%%i-%%j-%%k /S<br />IF "%1" == "" del cDate.date<BR>IF NOT "%1" == "" xcopy %Sourc% %Des%/D:%1 /S ]]></description>
		<eb:creationDate>2006-10-19 10:13:26</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
    <item>
		<title><![CDATA[ M ]]></title>
		<link>http://blog.tom.com/d_z_x_y/article/219.html</link>
		<description><![CDATA[ <br>
#include "stdafx.h"<br>
void worker(void *);<br>
bool quit = false;<br>
int count = 0;<br>
int main(int argc, char* argv[])<br>
{<br>
&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; 10; i++)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _beginthread(worker, 0, 0);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sleep(300);<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; int lastc = 0;<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; while (!_kbhit())<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sleep(1000);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int c = count;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("%dn", c - lastc);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lastc = c;<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; quit = true;<br>
&nbsp;&nbsp;&nbsp; Sleep(1000);<br>
&nbsp;<br>
&nbsp;return 0;<br>
}<br>
void worker(void *)<br>
{&nbsp;<br>
&nbsp;CoInitialize(NULL);<br>
&nbsp;for(int i = 0; i &lt; 500; i++)<br>
&nbsp;{<br>
&nbsp;<br>
&nbsp;}<br>
&nbsp;&nbsp;&nbsp; CoUninitialize();<br>
} ]]></description>
		<eb:creationDate>2006-10-18 09:35:15</eb:creationDate>
		<eb:modificationDate></eb:modificationDate>
    </item>
</channel>
</rss>