锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久人人爽人人爽人人片AV麻豆 ,久久精品无码av,久久频这里精品99香蕉久http://www.shnenglu.com/hblhs/zh-cnWed, 07 May 2025 16:59:47 GMTWed, 07 May 2025 16:59:47 GMT60awk 鏃ュ織鍒嗘瀽 杞崲鏃墮棿涓哄彲璇繪牸寮?/title><link>http://www.shnenglu.com/hblhs/archive/2014/09/16/208327.html</link><dc:creator>浼兼按涔嬪績</dc:creator><author>浼兼按涔嬪績</author><pubDate>Tue, 16 Sep 2014 08:33:00 GMT</pubDate><guid>http://www.shnenglu.com/hblhs/archive/2014/09/16/208327.html</guid><wfw:comment>http://www.shnenglu.com/hblhs/comments/208327.html</wfw:comment><comments>http://www.shnenglu.com/hblhs/archive/2014/09/16/208327.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hblhs/comments/commentRss/208327.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hblhs/services/trackbacks/208327.html</trackback:ping><description><![CDATA[<span style="color: #ff0000; font-family: sans-serif; font-size: 13px; line-height: 19.0499992370605px; background-color: #ffffff;">cat access.log | awk '$1=strftime("%F, %T", $1)'</span><img src ="http://www.shnenglu.com/hblhs/aggbug/208327.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hblhs/" target="_blank">浼兼按涔嬪績</a> 2014-09-16 16:33 <a href="http://www.shnenglu.com/hblhs/archive/2014/09/16/208327.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>杞澆涓涓猙t鍗忚鐨勫悕璇嶈В閲?/title><link>http://www.shnenglu.com/hblhs/archive/2014/02/18/205832.html</link><dc:creator>浼兼按涔嬪績</dc:creator><author>浼兼按涔嬪績</author><pubDate>Tue, 18 Feb 2014 04:31:00 GMT</pubDate><guid>http://www.shnenglu.com/hblhs/archive/2014/02/18/205832.html</guid><wfw:comment>http://www.shnenglu.com/hblhs/comments/205832.html</wfw:comment><comments>http://www.shnenglu.com/hblhs/archive/2014/02/18/205832.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hblhs/comments/commentRss/205832.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hblhs/services/trackbacks/205832.html</trackback:ping><description><![CDATA[<p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">.torrent:</strong> A .torrent fille contains all the info you need to download the file you want. For example, a torrent file has info on the size, the filename, and how to connect to other people (tracker). Another important function of the .torrent file is that it has a “hash” (sort of a digital signature) of each part of the file to make sure you don’t download corrupt of fake data but “the real thing”.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Client:</strong> The BitTorrent client is the application you use to “load” the .torrent file so that you can connect to other people. There are a lot of different torrent clients available. The three most popular clients are <a style="box-sizing: border-box; color: #353f45;">Bitcomet</a>, <a style="box-sizing: border-box; color: #353f45;">Azureus</a> and <a style="box-sizing: border-box; color: #353f45;">uTorrent</a>. If you’re new to<br style="box-sizing: border-box;" />BitTorrent I would recommend uTorrent, It’s light and has a great settings wizard to help you on your way.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Indexer:</strong> Indexers are websites which list (index) .torrent files (myBitTorrent, Torrentz, Mininova etc.).</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Leecher:</strong> A leecher is someone who is downloading (and uploading) a file. You are a leecher if you do not have a complete copy of the file you’re trying to get. Note that a leecher normally is someone who’s not uploading, that’s not true in the BitTorrent jargon.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Peer:</strong> A peer is the same as a leecher, but without the negative connotation.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Ratio:</strong> The data you uploaded divided by the data you downloaded. A ratio higher than 1.00 means that you upload more than you download, which is a good thing. Most private trackers keep track of your ratio and will ban or block you if you have a bad ratio. Try to get at least a 1.00 or higher ratio.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Scrape:</strong> Scraping means that your BitTorrent client is requesting info from the “tracker” about other people who are down- or uploading the file. This is important because you need to know who has pieces of the file you still need.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Seeder:</strong> A seeder is someone who has a complete version of the file you are downloading. If there are no seeders, you probably wont be able to get the file. So seeders are extremely important, make sure to “seed” the torrent once you finished downloading.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Tracker:</strong> The tracker is a server that has all the info about the people that are down- and uploading the file. The tracker itself does not have a copy of the file, it only tracks the up- and dowloaders and makes sure people are able to connect to each other. A tracker is not the same as a website that hosts torrents. Mininova for example is not a tracker, just a “torrent-site”.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Super-Seed:</strong> Some clients have the option to “super-seed”. Super seeding is different from seeding because it tries to send out pieces of the file that have not been sent before. So instead of sending the same piece to several peers, it tries to send a unique piece to everyone so that other peers can swap those pieces.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">Swarm:</strong> The swarm are all seeds and peers that are connected together. So if your client shows 5 seeds and 10 peers then that’s your swarm.</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;">Azureus has a <a style="box-sizing: border-box; color: #353f45;">plugin</a> to visualize the swarm</p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><a style="box-sizing: border-box; color: #353f45;"><img width="425" height="212" border="0" src="http://static.flickr.com/47/117494977_654890030d_o.png" alt="azureus BitTorrent swarm" style="box-sizing: border-box; border: 0px; max-width: 100%; height: auto;" /></a></p><blockquote style="box-sizing: border-box; margin: 1em 40px; color: #000000; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><p style="box-sizing: border-box; margin: 1em 0px;">Now let’s see if you learned something. If you can understand the next sentence you probably have.</p></blockquote><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><strong style="box-sizing: border-box;">DHT:</strong> DHT stands for “Distributed Hash Table”. DHT layers “decentralize” torrents what make them more stable and less reliant on the web based trackers. If a web based tracker goes down, the torrents stay alive because peers can act as “nodes” keeping the swarm intact.<br /><br /><br />鍘熸枃鍦板潃錛?span style="font-family: verdana, 'courier new'; font-size: 14px; line-height: 21px;">http://torrentfreak.com/bittorrent-jargon/</span></p><p style="box-sizing: border-box; margin: 1em 0px; font-family: proxima-nova, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff;"><br /><br /></p><img src ="http://www.shnenglu.com/hblhs/aggbug/205832.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hblhs/" target="_blank">浼兼按涔嬪績</a> 2014-02-18 12:31 <a href="http://www.shnenglu.com/hblhs/archive/2014/02/18/205832.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>mac osx 10.85 緙栬瘧瀹夎squid 3.4.1http://www.shnenglu.com/hblhs/archive/2013/12/20/204907.html浼兼按涔嬪績浼兼按涔嬪績Fri, 20 Dec 2013 05:16:00 GMThttp://www.shnenglu.com/hblhs/archive/2013/12/20/204907.htmlhttp://www.shnenglu.com/hblhs/comments/204907.htmlhttp://www.shnenglu.com/hblhs/archive/2013/12/20/204907.html#Feedback0http://www.shnenglu.com/hblhs/comments/commentRss/204907.htmlhttp://www.shnenglu.com/hblhs/services/trackbacks/204907.html2錛屽啀瀹夎Xcode command line tools;
3,涓嬭澆squid婧愮爜錛岃В鍖咃紱
4錛屽埌婧愮爜鐩綍錛宮kdir build, cd build;
5,sudo LIBS=-lresolv ../configure --prefix=/usr/squid
6,sudo make
7,sudo make install

瀹夎瀹屾垚


]]>
libtorrent 璁$畻褰撳墠涓嬭澆閲忔祦紼?/title><link>http://www.shnenglu.com/hblhs/archive/2013/09/09/203097.html</link><dc:creator>浼兼按涔嬪績</dc:creator><author>浼兼按涔嬪績</author><pubDate>Mon, 09 Sep 2013 00:54:00 GMT</pubDate><guid>http://www.shnenglu.com/hblhs/archive/2013/09/09/203097.html</guid><wfw:comment>http://www.shnenglu.com/hblhs/comments/203097.html</wfw:comment><comments>http://www.shnenglu.com/hblhs/archive/2013/09/09/203097.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hblhs/comments/commentRss/203097.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hblhs/services/trackbacks/203097.html</trackback:ping><description><![CDATA[<img src="http://www.shnenglu.com/images/cppblog_com/hblhs/statistics.jpg" width="712" height="830" alt="" /><img src ="http://www.shnenglu.com/hblhs/aggbug/203097.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hblhs/" target="_blank">浼兼按涔嬪績</a> 2013-09-09 08:54 <a href="http://www.shnenglu.com/hblhs/archive/2013/09/09/203097.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>VS寮鍙戜腑鐨勯潤鎬佺紪璇?/title><link>http://www.shnenglu.com/hblhs/archive/2013/09/09/203095.html</link><dc:creator>浼兼按涔嬪績</dc:creator><author>浼兼按涔嬪績</author><pubDate>Mon, 09 Sep 2013 00:48:00 GMT</pubDate><guid>http://www.shnenglu.com/hblhs/archive/2013/09/09/203095.html</guid><wfw:comment>http://www.shnenglu.com/hblhs/comments/203095.html</wfw:comment><comments>http://www.shnenglu.com/hblhs/archive/2013/09/09/203095.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hblhs/comments/commentRss/203095.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hblhs/services/trackbacks/203095.html</trackback:ping><description><![CDATA[<div> 閽堝鐜拌薄</div> <div>1錛?榪愯紼嬪簭鎻愮ず“鐢變簬搴旂敤紼嬪簭閰嶇疆涓嶆紜紝搴旂敤紼嬪簭鏈兘鍚姩銆傞噸鏂板畨瑁呭簲鐢ㄧ▼搴忓彲鑳戒細(xì)綰犳榪欎釜闂”</div> <div>2錛?紼嬪簭鍚姩鍗沖彂鐢熷紓甯革紝鎴栬呮病鍙嶅簲銆傦紙鍏蜂綋鐜拌薄璺熺郴緇熻緗湁鍏籌級</div> <div>3錛?瀹㈡埛绔彂甯冨繀欏昏繛甯svcr80.dll錛宮fc80.dll絳塪ll鍜宮anifest鏂囦歡鎵嶈兘姝e父榪愯<br /> <br /> </div> <div></div> <div> 闂瀹氫綅</div> <div>  鍑虹幇涓婅堪鐜拌薄涔嬪悗鍙互紜畾鏄己灝戠▼搴忚繍琛屾墍闇鐨勭幆澧冿紝鍙互閫氳繃瀹夎鐩稿簲鐨剉credist_x86.exe鏉ラ獙璇併傞拡瀵箆s鐗堟湰錛屽垎鍒湁</div> <div>32浣嶇殑錛圶86錛夛紝涔熸湁64浣嶇殑錛圶64錛夛紝璇鋒敞鎰忓尯鍒笅杞姐?/div> <div>★Microsoft Visual C++ 2005 Redistributable Package涓嬭澆鍦板潃錛?/div> <div>(x86)錛歨ttp://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=zh-cn</div> <div>(x64)錛歨ttp://www.microsoft.com/downloads/details.aspx?familyid=90548130-4468-4BBC-9673-D6ACABD5D13B&displaylang=zh-cn</div> <div>★Microsoft Visual C++ 2008 Redistributable Package鐨勪笅杞藉湴鍧錛?/div> <div>(x86):http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5582</div> <div>★Microsoft Visual C++ 2010 Redistributable Package</div> <div>(x86)錛歨ttp://www.microsoft.com/download/en/details.aspx?id=5555?</div> <div>(x64)錛歨ttp://www.microsoft.com/download/en/details.aspx?id=14632?</div> <div>濡傛灉瀹夎瀹屼箣鍚庡彲浠ユ甯歌繍琛岀▼搴忥紝鍙互緇х畫寰涓嬬湅錛屽鏋滆繕涓嶈錛岃鑰冭檻鍏跺畠鍘熷洜銆?/div> <div></div> <div><br /> <br />  瑙e喅鍔炴硶</div> <div>  濡傛灉鍙互鎺ュ彈錛岃鐢ㄦ埛鑷涓嬭澆VC榪愯搴撲篃鏄竴縐嶅姙娉曘?/div> <div>  鍏舵錛屽彲浠ユ妸紼嬪簭鎵闇鐨刣ll涓騫跺彂甯冦?/div> <div>  濡傛灉涓嶆兂甯﹀緢澶氭枃浠朵竴璧峰彂甯冿紝鍙互浣跨敤闈欐侀摼鎺ュ彂甯冪▼搴忋?/div> <div>  </div> <div>  闈欐侀摼鎺FC鍜孉TL搴撶殑鏂規(guī)硶鏄細(xì)</div> <div>  Alt+F7鎵撳紑Project Property錛屽睍寮錛?/div> <div>  Configuration Properties</div> <div>  General</div> <div>  Use of MFC</div> <div>  Use of ATL</div> <div>  鐒跺悗鏀規(guī)垚Static Library鍗沖彲.濡傛灉宸茬粡鏄?#8220;鍦ㄩ潤鎬佸簱涓嬌鐢?MFC”浜嗭紝鐢熸垚涔嬪悗鍦ㄧ洰鏍囨満鍣ㄨ繕鏄細(xì)鏈夌幇璞?鐨勬彁紺猴紝閭d箞寰堟湁鍙兘灝辨槸娌℃湁闈欐侀摼鎺錛孋++榪愯搴擄紝</div> <div>  msvcr鏄疌榪愯搴擄紝msvcp鏄疌++榪愯搴撱傚鏋滀綘浣跨敤浜哠TL涔嬬被C++鐨勪笢瑗匡紝msvcp灝辨槸蹇呴』鐨勩備慨鏀規(guī)柟娉曞涓嬶細(xì)</div> <div>  闈欐侀摼鎺SVCR鍜孧SVCP鐨勫姙娉曟槸錛?/div> <div>  Alt+F7鎵撳紑Project Property錛屽睍寮錛?/div> <div>  Configuration Properties</div> <div>  C/C++</div> <div>  Code Generation</div> <div>  Runtime Library</div> <div>  鐒跺悗灝嗛夐」鐢?MD鏀逛負(fù) "Multi-threaded (/MT)"</div> <div></div> <div>*鍐嶅鏋溿傘傘傘傘傛寜鐓т笂闈㈡搷浣滃畬鎴愪箣鍚庣▼搴忎緷鐒舵湁闂錛岃鑰冭檻錛氱▼搴忔湁娌℃湁闈欐佽繛鎺ュ叾瀹冪殑lib錛岃岃繖浜沴ib鏄笉鏄篃鏄悓鏍烽潤鎬佽繛鎺ョ殑C錛孋++榪愯搴擄紝濡傛灉榪炴帴鐨刲ib榪樹緷璧栧拰鍏跺畠鐨刲ib錛岄偅涔堣渚濊禆鐨刲ib鏄笉鏄悓鏍烽潤鎬侀摼鎺ヤ簡C錛孋++榪愯搴?*</div> <div></div> <div><br /> <br /> 涓句緥璇存槑</div> <div>   涓涓埄鐢╨ibtorrent搴撳紑鍙戠殑涓嬭澆嫻嬭瘯紼嬪簭錛堜互涓嬬畝縐頒負(fù)渚嬪瓙錛変負(fù)win32欏圭洰錛屾病鏈変嬌鐢╩fc,鍦ㄧ函鍑鐗堢郴緇熶笂榪愯闇瑕乵svcr鍜宮svcp鐨勬敮鎸併備緥瀛愮紪璇戜緷璧杔ibtorrent.lib錛岃宭ibtorrent.lib鍙堟繁搴︿緷璧朾oost搴擄紝紜繚渚嬪瓙闈欐佺紪璇戯紝涓嶅啀渚濊禆msvcr鍜宮svcp鐨勬敮鎸佸氨蹇呴』鍦ㄧ紪璇憀ibtorrent.lib鍜宐oost搴撶殑鏃跺欐槑紜潤鎬侀摼鎺,c++榪愯搴撱傜粡榪囧疄闄呮祴璇曪紝渚嬪瓙紼嬪簭宸茬粡瀹炵幇鍗曠嫭鍦ㄧ函鍑緋葷粺涓婄殑榪愯銆?/div> <div> </div> <div></div> <div>鍙傝冭祫鏂欙細(xì)</div> <div>http://wylht.blogspot.com/2012_03_01_archive.html 錛堥渶fan澧欒闂級</div> <div>http://gamebabyrocksun.blog.163.com/blog/static/57153463201081101856593/</div> <div>http://www.cnblogs.com/dementia/archive/2009/04/10/1433217.html</div><img src ="http://www.shnenglu.com/hblhs/aggbug/203095.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hblhs/" target="_blank">浼兼按涔嬪績</a> 2013-09-09 08:48 <a href="http://www.shnenglu.com/hblhs/archive/2013/09/09/203095.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>pc閫氳繃鎵嬫満錛堢Щ鍔ㄥ崱錛夋嫧鍙蜂笂緗?/title><link>http://www.shnenglu.com/hblhs/archive/2013/02/02/197675.html</link><dc:creator>浼兼按涔嬪績</dc:creator><author>浼兼按涔嬪績</author><pubDate>Sat, 02 Feb 2013 03:47:00 GMT</pubDate><guid>http://www.shnenglu.com/hblhs/archive/2013/02/02/197675.html</guid><wfw:comment>http://www.shnenglu.com/hblhs/comments/197675.html</wfw:comment><comments>http://www.shnenglu.com/hblhs/archive/2013/02/02/197675.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hblhs/comments/commentRss/197675.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hblhs/services/trackbacks/197675.html</trackback:ping><description><![CDATA[<pre style="padding-bottom: 0px; widows: 2; text-transform: none; background-color: rgb(255,252,246); text-indent: 0px; margin: 0px 0px 10px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/24px arial, 'courier new', courier, 瀹嬩綋, monospace; word-wrap: break-word; white-space: pre-wrap; orphans: 2; color: rgb(0,0,0); word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" id="best-content-194379062" class="best-text mb-10" accuse="aContent">1銆佸畨瑁呮墜鏈洪┍鍔紱 <br />2銆佽緗甈C涓婄殑璋冨埗瑙h皟鍣ㄥ睘鎬э紱 <br />A, 鐢?shù)鑴戝彸閿Q岀鐞嗭紝璁懼綆$悊錛岃皟鍒惰В璋冨櫒錛?<br />B, 璁劇疆MODEM灞炴э紝楂樼駭錛嶉澶栬緗腑錛屾坊鍔犲涓嬪懡浠わ細(xì) <br />cmnet鏄細(xì)AT+CGDCONT=1,"ip","cmnet" <br />cmwap鏄細(xì)+CGDCONT=,,"cmwap"<br />3銆乧mnet鎷ㄥ彿鍙風(fēng)爜鏄細(xì)*99***1# <br /> cmwap鎷ㄥ彿鍙風(fēng)爜鏄細(xì)*99#</pre><pre style="padding-bottom: 0px; widows: 2; text-transform: none; background-color: rgb(255,252,246); text-indent: 0px; margin: 0px 0px 10px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/24px arial, 'courier new', courier, 瀹嬩綋, monospace; word-wrap: break-word; white-space: pre-wrap; orphans: 2; color: rgb(0,0,0); word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="best-text mb-10" accuse="aContent">   鐢ㄦ埛鍚嶅瘑鐮佷負(fù)絀?/pre><pre style="padding-bottom: 0px; widows: 2; text-transform: none; background-color: rgb(255,252,246); text-indent: 0px; margin: 0px 0px 10px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/24px arial, 'courier new', courier, 瀹嬩綋, monospace; word-wrap: break-word; white-space: pre-wrap; orphans: 2; color: rgb(0,0,0); word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="best-text mb-10" accuse="aContent"> </pre><pre style="padding-bottom: 0px; widows: 2; text-transform: none; background-color: rgb(255,252,246); text-indent: 0px; margin: 0px 0px 10px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/24px arial, 'courier new', courier, 瀹嬩綋, monospace; word-wrap: break-word; white-space: pre-wrap; orphans: 2; color: rgb(0,0,0); word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="best-text mb-10" accuse="aContent">鏁版嵁綰胯繛鎺C涔嬪悗鏂板緩internet榪炴帴錛屾寜涓婇潰淇℃伅杈撳叆錛屾嫧鍙鳳紝姝e父鐨勮瘽鎴愬姛涔嬪悗灝卞彲浠ョ敤PC鎵撳紑緗戦〉浜?/pre><img src ="http://www.shnenglu.com/hblhs/aggbug/197675.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hblhs/" target="_blank">浼兼按涔嬪績</a> 2013-02-02 11:47 <a href="http://www.shnenglu.com/hblhs/archive/2013/02/02/197675.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MFC鍒ゆ柇緗戠粶鏂囦歡鏄惁瀛樺湪http://www.shnenglu.com/hblhs/archive/2009/10/20/99039.html浼兼按涔嬪績浼兼按涔嬪績Tue, 20 Oct 2009 08:09:00 GMThttp://www.shnenglu.com/hblhs/archive/2009/10/20/99039.htmlhttp://www.shnenglu.com/hblhs/comments/99039.htmlhttp://www.shnenglu.com/hblhs/archive/2009/10/20/99039.html#Feedback0http://www.shnenglu.com/hblhs/comments/commentRss/99039.htmlhttp://www.shnenglu.com/hblhs/services/trackbacks/99039.html
CInternetSession sess ;
    DWORD dwFlag 
= INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_DONT_CACHE|INTERNET_FLAG_RELOAD ;
    CHttpFile 
*pF = (CHttpFile*)sess.OpenURL("http://www.google.cn/images/na666v_logo7.png",
        
1, dwFlag);
    ASSERT(pF);
    
if(!pF)//緗戜笂鏈変漢璇村垽鏂璈ttpFile鎸囬拡鏄惁涓虹┖灝卞彲浠ュ垽鏂綉緇滄枃浠舵槸鍚﹀瓨鍦紝緇忓疄楠屼竴鐩翠笉涓虹┖錛岄儊闂鳳紝鏄垜鐨勬満鍣ㄩ棶棰橈紵
    {
        AfxThrowInternetException(
1);
    }

    CString str;
    pF
->QueryInfo (HTTP_QUERY_STATUS_CODE, str);//HTTP_QUERY_STATUS_CODE鏌ヨ鐘舵佷俊鎭紝榪欓噷鍙互鏌ヨ鏂囦歡鐨勫ぇ灝忕瓑絳夛紝鍏蜂綋鐨勫湪HTTP_QUERY_STATUS_CODE涓婂彸閿紝杞埌瀹氫箟錛屾湁寰堝鍙夐」
    int b = _ttoi(str);
    
if (b==404)
    {
        AfxMessageBox(
"鏂囦歡涓嶅瓨鍦?/span>");
    } 
    
else
    {
        AfxMessageBox(
"瀛樺湪");
    }




]]>
鍒╃敤ICMP鍜孯AS錛圧emote Access Service錛夎繘琛岀殑涓浜涚綉緇滄搷浣?/title><link>http://www.shnenglu.com/hblhs/archive/2009/10/10/98256.html</link><dc:creator>浼兼按涔嬪績</dc:creator><author>浼兼按涔嬪績</author><pubDate>Sat, 10 Oct 2009 09:27:00 GMT</pubDate><guid>http://www.shnenglu.com/hblhs/archive/2009/10/10/98256.html</guid><wfw:comment>http://www.shnenglu.com/hblhs/comments/98256.html</wfw:comment><comments>http://www.shnenglu.com/hblhs/archive/2009/10/10/98256.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hblhs/comments/commentRss/98256.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hblhs/services/trackbacks/98256.html</trackback:ping><description><![CDATA[<span style="font-size: 9pt; font-family: 瀹嬩綋;"></span>棣栧厛鏄敤ICMP媯鏌ョ綉緇滄槸鍚﹁繛閫氾細(xì)<br><br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">bool</span><span style="color: #000000;"> Util::CheckInternet()<br>{<br>    </span><span style="color: #0000ff;">char</span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">SendData </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">Data Buffer</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>    LPVOID ReplyBuffer;<br>    DWORD dwRetVal;<br>    HANDLE hIcmpFile;<br>    </span><span style="color: #0000ff;">bool</span><span style="color: #000000;"> b</span><span style="color: #000000;">=</span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> ((hIcmpFile </span><span style="color: #000000;">=</span><span style="color: #000000;"> IcmpCreateFile()) </span><span style="color: #000000;">==</span><span style="color: #000000;"> INVALID_HANDLE_VALUE)<br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br><br>    ReplyBuffer </span><span style="color: #000000;">=</span><span style="color: #000000;"> (VOID</span><span style="color: #000000;">*</span><span style="color: #000000;">) malloc(</span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(ICMP_ECHO_REPLY) </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(SendData));<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> ((dwRetVal </span><span style="color: #000000;">=</span><span style="color: #000000;"> IcmpSendEcho(hIcmpFile, <br>        inet_addr(</span><span style="color: #000000;">"</span><span style="color: #000000;">209.131.36.158</span><span style="color: #000000;">"</span><span style="color: #000000;">), //鐢ㄧ殑闆呰檸鐨勪竴涓狪P錛屽彲鑳藉歡榪熶細(xì)澶т竴鐐癸紝鐢ㄥ浗鍐呯殑浼?xì)灏忎竴鐐?br>        SendData, </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(SendData), <br>        NULL, ReplyBuffer, <br>        </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(ReplyBuffer) </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(ICMP_ECHO_REPLY),<br>        </span><span style="color: #000000;">1000</span><span style="color: #000000;">)) </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">) {<br>        b</span><span style="color: #000000;">=</span><span style="color: #0000ff;">true</span><span style="color: #000000;">;<br>    }<br>    free(ReplyBuffer);<br>    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> b;<br>}</span></div> 寰堢畝鍗曠殑鍑犺浠g爜錛屾病鏈夋敞閲婏紱<br>濡傛灉緗戠粶涓嶉氱殑璇濇灇涓炬嫧鍙瘋繛鎺ワ紝榪涜鎷ㄥ彿錛?br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">bool</span><span style="color: #000000;"> RASManager::ConnectNetwork()<br>{<br>    RASENTRYNAME Entries[</span><span style="color: #000000;">15</span><span style="color: #000000;">];   <br>    DWORD cb,cEntries,dwRet;   <br>    Entries[</span><span style="color: #000000;">0</span><span style="color: #000000;">].dwSize</span><span style="color: #000000;">=</span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASENTRYNAME);   <br>    cb</span><span style="color: #000000;">=</span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(Entries);   <br>    cEntries</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;   <br>    <br>    dwRet</span><span style="color: #000000;">=</span><span style="color: #000000;">::RasEnumEntries(NULL, NULL, </span><span style="color: #000000;">&</span><span style="color: #000000;">Entries[</span><span style="color: #000000;">0</span><span style="color: #000000;">], </span><span style="color: #000000;">&</span><span style="color: #000000;">cb, </span><span style="color: #000000;">&</span><span style="color: #000000;">cEntries);</span><span style="color: #008000;">//</span><span style="color: #008000;">濡傛灉鍑芥暟鎴愬姛錛屽垯榪斿洖0   </span><span style="color: #008000;"><br></span><span style="color: #000000;">    <br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(dwRet </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)   <br>    {<br>        CHAR  szRasEntryName[RAS_MaxEntryName </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">=</span><span style="color: #000000;">{</span><span style="color: #000000;">0</span><span style="color: #000000;">};<br>        </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(UINT i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i</span><span style="color: #000000;"><</span><span style="color: #000000;">cEntries;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>            strcpy(szRasEntryName,Entries[i].szEntryName);<br>        RASDIALPARAMS rdParams;<br>        DWORD dwRet;<br>        hConn</span><span style="color: #000000;">=</span><span style="color: #000000;">NULL;<br>        rdParams.dwSize</span><span style="color: #000000;">=</span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASDIALPARAMS);<br>        strcpy(rdParams.szEntryName,szRasEntryName);<br>        strcpy(rdParams.szPhoneNumber,</span><span style="color: #000000;">"</span><span style="color: #000000;">#777</span><span style="color: #000000;">"</span><span style="color: #000000;">);</span><span style="color: #008000;">//</span><span style="color: #008000;">鎴戠敤鐨?G鍗★紝鎷?777鍙風(fēng)爜</span><span style="color: #008000;"><br></span><span style="color: #000000;">        strcpy(rdParams.szUserName,</span><span style="color: #000000;">"</span><span style="color: #000000;">鐢ㄦ埛鍚?/span><span style="color: #000000;">"</span><span style="color: #000000;">);<br>        strcpy(rdParams.szPassword,</span><span style="color: #000000;">"</span><span style="color: #000000;">瀵嗙爜</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br>        strcpy(rdParams.szDomain,"");//榪欎釜涔熷緢閲嶈錛屾寚瀹氬煙錛屽鏋滀笉鎸囧畾榪欎釜鐨勮瘽涓嬮潰娉ㄩ噴鐨勪袱鍙ヤ竴瀹氳鍔犱笂錛屼笅杈逛袱鍙ョ殑鎰忔濇槸鑾峰彇鏈鍚庝竴嬈¤繛鎺ユ垚鍔熸椂鐨勫弬鏁頒俊鎭紝濡傛灉鐢ㄤ笅杈逛袱鍙ョ殑璇濊繛鍚岃繖琛屽拰榪欒涓婇潰鐨勪笁琛岄兘鍙互鐪佺暐<br>       // BOOL fPass;<br>        //RasGetEntryDialParams(NULL, </span><span style="color: #000000;">&</span><span style="color: #000000;">rdParams,</span><span style="color: #000000;">&</span><span style="color: #000000;">fPass);<br>        dwRet</span><span style="color: #000000;">=</span><span style="color: #000000;">RasDial(NULL,NULL,</span><span style="color: #000000;">&</span><span style="color: #000000;">rdParams,</span><span style="color: #000000;">0L</span><span style="color: #000000;">,NULL,</span><span style="color: #000000;">&</span><span style="color: #000000;">hConn);<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(dwRet</span><span style="color: #000000;">!=</span><span style="color: #000000;">0</span><span style="color: #000000;">)<br>        {<br>            </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>        }<br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">true</span><span style="color: #000000;">;<br>    }    <br>    </span><span style="color: #0000ff;">else</span><span style="color: #000000;">    <br>    {    <br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    }<br>}<br></span></div> 棰勫厛寤虹珛鎷ㄥ彿榪炴帴錛屼互涓婃嫧鍙蜂唬鐮佺粡榪囦慨鏀瑰凡緇忎笉闇瑕佷繚瀛樺瘑鐮侊紝鍙緩绔嬩竴涓嫧鍙瘋繛鎺ュ嵆鍙?strong>Windows XP or later:  </strong>Do not use the <strong>RasSetEntryDialParams</strong> function. MSDN涓婇潰鐨勮娉曞氨鏄?strong>RasSetEntryDialParams</strong> 鍒湪XP涔嬪悗鐨勭郴緇熶笂浣跨敤浜嗐?br>媯鏌ユ嫧鍙瘋繛鎺ョ殑鐘舵侊紝濡傛灉宸茬粡閫氳繃鎷ㄥ彿榪炴帴涓婁簡緗戠粶褰撶劧涓嶇敤鍐嶈繘琛屾嫧鍙蜂簡錛屼唬鐮佸涓嬶細(xì)<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">bool</span><span style="color: #000000;"> RASManager::RasGetConnectStatus()<br>{<br>    LPRASCONN lpRasConn </span><span style="color: #000000;">=</span><span style="color: #000000;"> NULL;    <br>    DWORD   cbBuf   </span><span style="color: #000000;">=</span><span style="color: #000000;">   </span><span style="color: #000000;">0</span><span style="color: #000000;">;    <br>    DWORD   cConn   </span><span style="color: #000000;">=</span><span style="color: #000000;">   </span><span style="color: #000000;">0</span><span style="color: #000000;">;    <br>    DWORD   dwRet   </span><span style="color: #000000;">=</span><span style="color: #000000;">   </span><span style="color: #000000;">0</span><span style="color: #000000;">;    <br>    HRASCONN  hrasconn;<br>    </span><span style="color: #0000ff;">bool</span><span style="color: #000000;">    bResult</span><span style="color: #000000;">=</span><span style="color: #000000;">FALSE;<br>    RASCONNSTATUS rasStatus;    <br>    UINT   ndx;<br>    cbBuf </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASCONN);<br>    lpRasConn </span><span style="color: #000000;">=</span><span style="color: #000000;"> (LPRASCONN)malloc((UINT)cbBuf);  <br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (lpRasConn </span><span style="color: #000000;">!=</span><span style="color: #000000;"> NULL)<br>    {    <br>        lpRasConn</span><span style="color: #000000;">-></span><span style="color: #000000;">dwSize </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASCONN);    <br>        dwRet </span><span style="color: #000000;">=</span><span style="color: #000000;"> RasEnumConnections(lpRasConn,</span><span style="color: #000000;">&</span><span style="color: #000000;">cbBuf,</span><span style="color: #000000;">&</span><span style="color: #000000;">cConn);  <br>        </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(ndx</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;ndx</span><span style="color: #000000;"><</span><span style="color: #000000;">cConn;ndx</span><span style="color: #000000;">++</span><span style="color: #000000;">)      <br>        {<br>            hrasconn </span><span style="color: #000000;">=</span><span style="color: #000000;"> lpRasConn[ndx].hrasconn;            <br>            rasStatus.dwSize </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASCONNSTATUS);<br>            dwRet </span><span style="color: #000000;">=</span><span style="color: #000000;"> ::RasGetConnectStatus(hrasconn,</span><span style="color: #000000;">&</span><span style="color: #000000;">rasStatus);<br>            </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(dwRet)    <br>                bResult</span><span style="color: #000000;">=</span><span style="color: #000000;">FALSE;    <br>            </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br>            {    <br>                </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(rasStatus.rasconnstate </span><span style="color: #000000;">==</span><span style="color: #000000;"> RASCS_Connected)    <br>                    bResult</span><span style="color: #000000;">=</span><span style="color: #000000;">TRUE;    <br>                </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br>                    bResult</span><span style="color: #000000;">=</span><span style="color: #000000;">FALSE;    <br>            }<br>        }<br>    }<br>    </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br>        bResult</span><span style="color: #000000;">=</span><span style="color: #000000;">FALSE;<br>    free(lpRasConn);<br>    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> bResult;<br>}</span></div> 浠ヤ笂鍒ゆ柇鏄鏋滄鏌ュ埌鏈変竴涓凡緇忚繛鎺ョ殑鎷ㄥ彿榪炴帴灝辮繑鍥炰簡錛屽簲璇ヤ笉浼?xì)鏈変袱涓垨鑰呬互涓婄殑鎷ㄥ彿榪炴帴鍚屾椂榪炴帴錛屾墦寮绔彛浼?xì)澶辫触鐨勩?br>榪樻湁涓涓槸鏂嚎錛?br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">void</span><span style="color: #000000;"> RASManager::HungUP()<br>{<br>    LPRASCONN lpRasConn</span><span style="color: #000000;">=</span><span style="color: #000000;">NULL;<br>    DWORD   cbBuf </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    DWORD   cConn </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    DWORD   dwRet </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    HRASCONN   hrasconn;<br>    RASCONNSTATUS rasStatus;<br>    UINT   ndx;<br>    <br>    cbBuf </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASCONN);<br>    lpRasConn </span><span style="color: #000000;">=</span><span style="color: #000000;"> (LPRASCONN)malloc((UINT)cbBuf);<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(lpRasConn </span><span style="color: #000000;">!=</span><span style="color: #000000;"> NULL)<br>    {<br>        lpRasConn</span><span style="color: #000000;">-></span><span style="color: #000000;">dwSize </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASCONN);    <br>        dwRet </span><span style="color: #000000;">=</span><span style="color: #000000;"> RasEnumConnections(lpRasConn,</span><span style="color: #000000;">&</span><span style="color: #000000;">cbBuf,</span><span style="color: #000000;">&</span><span style="color: #000000;">cConn);  <br>        <br>        </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(ndx</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;ndx</span><span style="color: #000000;"><</span><span style="color: #000000;">cConn;ndx</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>        {<br>            hrasconn </span><span style="color: #000000;">=</span><span style="color: #000000;"> lpRasConn[ndx].hrasconn;<br>            rasStatus.dwSize </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASCONNSTATUS);<br>            dwRet </span><span style="color: #000000;">=</span><span style="color: #000000;"> ::RasGetConnectStatus(hrasconn,</span><span style="color: #000000;">&</span><span style="color: #000000;">rasStatus);<br>            </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(</span><span style="color: #000000;">!</span><span style="color: #000000;">dwRet)<br>            {<br>                </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(rasStatus.rasconnstate </span><span style="color: #000000;">==</span><span style="color: #000000;"> RASCS_Connected)<br>                    RasHangUp(hrasconn);<br>            }<br>        }<br>        free(lpRasConn);<br>    }<br>}</span></div> 榪欎釜娌′粈涔堝ソ璇寸殑錛屾墽琛屽叧闂嫧鍙瘋繛鎺ョ殑鎿嶄綔銆?br>鐢ㄧ▼搴忓垱寤鴻繛鎺ワ紝緇忚繃淇敼錛屽凡緇忓彲浠ユ甯稿垱寤鴻繛鎺ワ紝浠g爜濡備笅錛?br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">bool</span><span style="color: #000000;"> RASManager::CreateRASLink()<br>{<br>    LPRASENTRY lpRasEntry </span><span style="color: #000000;">=</span><span style="color: #000000;"> NULL;<br>    DWORD cb </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASENTRY);<br>    DWORD dwBufferSize </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    DWORD dwRet </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    <br>    <br>    </span><span style="color: #008000;">//</span><span style="color: #008000;"> 鍙栧緱entry鐨勫ぇ灝?榪欏彞涔熶笉鐭ラ亾鏄笉鏄繀欏葷殑,鍥犱負(fù)sizeof(RASENTRY)鍜岃繖閲屽彇鍒扮殑dwBufferSize鏄竴鏍風(fēng)殑,涓嶈繃榪樻槸Get涓涓嬪畨鍏ㄧ偣</span><span style="color: #008000;"><br></span><span style="color: #000000;">    RasGetEntryProperties(NULL,</span><span style="color: #000000;">""</span><span style="color: #000000;">, NULL, </span><span style="color: #000000;">&</span><span style="color: #000000;">dwBufferSize, NULL, NULL); <br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (dwBufferSize </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)<br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    <br>    lpRasEntry </span><span style="color: #000000;">=</span><span style="color: #000000;"> (LPRASENTRY)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwBufferSize);<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (lpRasEntry </span><span style="color: #000000;">==</span><span style="color: #000000;"> NULL)<br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    <br>    ZeroMemory(lpRasEntry, </span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASENTRY));<br>    lpRasEntry</span><span style="color: #000000;">-></span><span style="color: #000000;">dwSize </span><span style="color: #000000;">=</span><span style="color: #000000;"> dwBufferSize;<br>    lpRasEntry</span><span style="color: #000000;">-></span><span style="color: #000000;">dwfOptions </span><span style="color: #000000;">=</span><span style="color: #000000;"> RASEO_RemoteDefaultGateway|RASEO_PreviewPhoneNumber|RASEO_PreviewUserPw; </span><span style="color: #008000;">//</span><span style="color: #008000;"> 榪欓噷鐨勫嚑涓夐」鎸洪噸瑕佺殑錛?/span><span style="color: #000000;">RASEO_RemoteDefaultGateway榪欎釜閫夐」鎶婂垱寤虹殑榪炴帴璁劇疆涓洪粯璁よ繛鎺ワ紝</span><span style="color: #000000;">RASEO_PreviewPhoneNumber</span>瀵瑰簲閫夐」涓殑鎻愮ず杈撳叆鐢?shù)璇濆忥L(fēng)爜錛?span style="color: #000000;">RASEO_PreviewUserPw瀵瑰簲閫夐」涓殑鎻愮ず鐢ㄦ埛鍚嶅拰瀵嗙爜</span><br><span style="color: #000000;">    lpRasEntry</span><span style="color: #000000;">-></span><span style="color: #000000;">dwType </span><span style="color: #000000;">=</span><span style="color: #000000;"> RASET_Phone;<br>    <br>    lstrcpy(lpRasEntry</span><span style="color: #000000;">-></span><span style="color: #000000;">szDeviceType, RASDT_Modem);<br>    lstrcpy(lpRasEntry</span><span style="color: #000000;">-></span><span style="color: #000000;">szDeviceName,</span><span style="color: #000000;">"</span><span style="color: #000000;">www</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br>    lpRasEntry</span><span style="color: #000000;">-></span><span style="color: #000000;">dwfNetProtocols </span><span style="color: #000000;">=</span><span style="color: #000000;"> RASNP_Ip;<br>    lpRasEntry</span><span style="color: #000000;">-></span><span style="color: #000000;">dwFramingProtocol </span><span style="color: #000000;">=</span><span style="color: #000000;"> RASFP_Ppp;<br>    <br>    dwRet </span><span style="color: #000000;">=</span><span style="color: #000000;"> RasSetEntryProperties(NULL, </span><span style="color: #000000;">"</span><span style="color: #000000;">www</span><span style="color: #000000;">"</span><span style="color: #000000;">, lpRasEntry, dwBufferSize, NULL, </span><span style="color: #000000;">0</span><span style="color: #000000;">); </span><span style="color: #008000;">//</span><span style="color: #008000;"> 鍒涘緩榪炴帴</span><span style="color: #008000;"><br>//</span>The <strong>RasSetEntryProperties</strong> function changes the connection information for an entry in the phone book or creates a new phone-book entry.錛坮eference MSDN錛?br><span style="color: #000000;">    HeapFree(GetProcessHeap(), </span><span style="color: #000000;">0</span><span style="color: #000000;">, (LPVOID)lpRasEntry);<br>    <br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (dwRet </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)<br>        </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #0000ff;">true</span><span style="color: #000000;">;<br>}</span></div> 涓婇潰鐨勪唬鐮佸埌鏄彲浠ュ垱寤轟竴涓嫧鍙瘋繛鎺ワ紝涓嶈繃鏄釜絀虹殑錛岄噷闈㈡病鐢ㄧ敤鎴峰悕鍜屽瘑鐮佺瓑淇℃伅錛岄渶瑕佺敤涓婇潰鐨勬嫧鍙蜂唬鐮佹潵鎸囧畾鎷ㄥ彿鍙傛暟錛屼笉鑳戒嬌鐢?span style="color: #000000;">RasGetEntryDialParams鏉ヨ幏鍙栦簡銆?/span><br>涓婇潰鐨勪唬鐮佸熀鏈笂鏄湪緗戠粶涓婃悳绱㈡墍寰楋紝紼嶅姞淇敼錛屽湪榪欓噷鏁寸悊涓涓嬨?br><br>鍐嶈ˉ鍏呬竴涓嬪垹闄よ繛鎺ョ殑鎿嶄綔,浠g爜濡備笅錛?br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">void</span><span style="color: #000000;"> RASManager::DeletePhoneBookEntry()<br>{<br>    RASENTRYNAME Entries[</span><span style="color: #000000;">15</span><span style="color: #000000;">];   <br>    DWORD cb,cEntries,dwRet;<br>    Entries[</span><span style="color: #000000;">0</span><span style="color: #000000;">].dwSize</span><span style="color: #000000;">=</span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(RASENTRYNAME);   <br>    cb</span><span style="color: #000000;">=</span><span style="color: #0000ff;">sizeof</span><span style="color: #000000;">(Entries);<br>    cEntries</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;   <br>    <br>    dwRet</span><span style="color: #000000;">=</span><span style="color: #000000;">::RasEnumEntries(NULL, NULL, </span><span style="color: #000000;">&</span><span style="color: #000000;">Entries[</span><span style="color: #000000;">0</span><span style="color: #000000;">], </span><span style="color: #000000;">&</span><span style="color: #000000;">cb, </span><span style="color: #000000;">&</span><span style="color: #000000;">cEntries);</span><span style="color: #008000;">//</span><span style="color: #008000;">濡傛灉鍑芥暟鎴愬姛錛屽垯榪斿洖0   </span><span style="color: #008000;"><br></span><span style="color: #000000;">    <br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(dwRet </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)   <br>    {<br>        CHAR  szRasEntryName[RAS_MaxEntryName </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">=</span><span style="color: #000000;">{</span><span style="color: #000000;">0</span><span style="color: #000000;">};<br>        </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(UINT i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i</span><span style="color: #000000;"><</span><span style="color: #000000;">cEntries;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>        {<br>            strcpy(szRasEntryName,Entries[i].szEntryName);<br>            RasDeleteEntry(NULL,szRasEntryName);<br>        }<br>    }<br>}</span></div> <span style="font-size: 9pt; font-family: 瀹嬩綋;"></span>瑕佹兂瀹炵幇鑷姩鍚姩鎷ㄥ彿緗戠粶錛屽氨瑕佷嬌鐢≧emote Access Service (RAS) API錛岃繖涓狝PI鏈鏃╂槸鍦╓indows for Workgroup 3.11涓嚭鐜扮殑錛岀幇鍦ㄥ畠宸茬粡鎴愪負(fù)Win32 API鐨勪竴涓粍鎴愰儴鍒嗐傝API灝嗘暣涓嫧鍙風(fēng)綉緇滅О涓篜honebook錛岃屾瘡涓涓繛鎺ョО涓篜honebookEntry銆備綘鍙互浣跨敤RasCreatePhonebookEntry鏉ュ垱寤烘柊鐨勮繛鎺ワ紝鐢≧asDial鏉ユ嫧鍙鳳紝鑰孯asEnumEntries鍙互鑾峰緱褰撳墠緋葷粺宸叉湁鐨勬墍鏈夎繛鎺ワ紝浣跨敤鍏跺畠鐨凴AS鍑芥暟榪樺彲浠ヨ幏鍙栨垨璁劇疆榪炴帴鐨勫弬鏁般?RasEditPhonebookEntry鍑芥暟灝嗘縺媧繪爣鍑嗙殑Windows 95/NT灞炴у璇濇鏉ヤ慨鏀硅繛鎺ョ殑灞炴с備綘鍙互浠嶹in32 API鐨勬墜鍐屾壘鍒版墍鏈夌浉鍏沖嚱鏁扮殑璇︾粏浠嬬粛銆?br><br>琛ュ厖錛氬湪windows涓竴涓嫧鍙瘋繛鎺ュ嵆涓轟竴涓狿honrbookEntry浠ヤ笅縐頒負(fù)鐢?shù)璇濊杽璁板綍鎴栨槸杩炴帴銆傛葷殑榪欎簺縐頒負(fù)Phonebook銆?br><br> <img src ="http://www.shnenglu.com/hblhs/aggbug/98256.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hblhs/" target="_blank">浼兼按涔嬪績</a> 2009-10-10 17:27 <a href="http://www.shnenglu.com/hblhs/archive/2009/10/10/98256.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎸囬拡涓庢暟緇勭殑闂http://www.shnenglu.com/hblhs/archive/2009/09/24/97106.html浼兼按涔嬪績浼兼按涔嬪績Thu, 24 Sep 2009 03:14:00 GMThttp://www.shnenglu.com/hblhs/archive/2009/09/24/97106.htmlhttp://www.shnenglu.com/hblhs/comments/97106.htmlhttp://www.shnenglu.com/hblhs/archive/2009/09/24/97106.html#Feedback0http://www.shnenglu.com/hblhs/comments/commentRss/97106.htmlhttp://www.shnenglu.com/hblhs/services/trackbacks/97106.html{
int a[5]={1,2,3,4,5};
int *ptr1=(int *)(&a+1);
// a鏈韓灝變負(fù)涓涓暟緇勭殑鍦板潃錛屽叾鍊?&a[0]錛屽嵆鏁扮粍絎竴涓厓绱犵殑鍦板潃錛屽a鍐嶅彇鍧
// &a = a錛屼技涔庢病浠涔堜笉鍚岋紝鍏跺疄榪欓噷鍙戠敓浜嗗榻愬彉鏇達(dá)紝a+1鐨勫榻愭槸浠nt涓虹晫鐨?br>// 鑰?amp;a+1鏄互鏁翠釜鏁扮粍涓哄崟浣嶇殑錛屽嵆5涓猧nt=20瀛楄妭錛岃繖鏄叧閿紒錛侊紒
// 閭d箞&a+1瀹為檯鏄法瓚婁簡鏁翠釜鏁扮粍錛屽彲寰梡tr1瀛樺偍浜嗘暟緇刟鏈鍚庝竴涓厓绱?绱ц窡鐫鐨勪竴涓猧nt鐨勫湴鍧

int *ptr2=(int *)((int )a+1);
// 鍚岀悊錛?int)a鍏堝皢鍏跺鹼紙鍦板潃錛夎漿涓烘暣鍨嬪鹼紝鍐嶅姞涓鎴愪負(fù)涓涓柊鐨勬暣鏁?br>// (int *)灝嗚繖涓艱漿鎹負(fù)涓涓寚鍚慽nt鍨嬪彉閲忕殑鎸囬拡錛堝湴鍧錛?br>// ptr2鍗沖瓨鍌ㄤ簡榪欎釜鍦板潃鍜屾寚鍚戠殑鍙橀噺鐨勭被鍨?br>
printf("%x,%x",ptr1[-1],*ptr2);
// 鍏堣В閲婁竴涓媋[-1]錛屽嵆灝嗘暟緇勫悜鍓嶅亸宸竴涓被鍨嬪ぇ灝忕殑璺濈
// 鏁扮粍a鐨勫唴瀛樺竷灞(16榪涘埗)錛?1000000 02000000 03000000 04000000 05000000
// ptr1[-1]
// 浣犺榪欓噷絳変簬浠涔堝憿錛熸暟緇刟鏈鍚庝竴涓厓绱狅紙5錛夌揣璺熺潃涓涓猧nt鐨勫墠闈竴涓厓绱犲綋鐒跺氨鏄?浜嗐?br>// *ptr2
// ptr2鐨勫間負(fù)a淇濆瓨鐨勫湴鍧鍊肩殑緇濆鍊?1錛屽亣璁綼=1000錛岄偅涔?int)a+1=1001銆?br>// 鑰屽悗灝嗗叾鍐嶈漿涓?int *)鎸囬拡錛岄偅涔堟寚閽堟寚鍚戠殑鍐呭瓨甯冨眬涓?00000 02錛屽嵆鍚戝悗縐諱簡涓涓瓧鑺?br>// 閭d箞鍦╨ittle-enddian鏋舵瀯涓嬫樉紺哄嚭鏉ヤ負(fù)02000000錛屼綆浣嶅湪楂樺湴鍧銆?br>
return 0;
}


]]>
鑾峰彇鎵撳嵃鏈鴻繛鎺ョ姸鎬佸強(qiáng)鎵撳嵃浠誨姟鏄惁閿欒http://www.shnenglu.com/hblhs/archive/2009/07/15/90157.html浼兼按涔嬪績浼兼按涔嬪績Wed, 15 Jul 2009 09:49:00 GMThttp://www.shnenglu.com/hblhs/archive/2009/07/15/90157.htmlhttp://www.shnenglu.com/hblhs/comments/90157.htmlhttp://www.shnenglu.com/hblhs/archive/2009/07/15/90157.html#Feedback3http://www.shnenglu.com/hblhs/comments/commentRss/90157.htmlhttp://www.shnenglu.com/hblhs/services/trackbacks/90157.html    if   (OpenPrinter("EPSON Stylus Photo R270 Series",&PrnHandle,NULL))  
    {  
        unsigned    char   buf[8192];  
        DWORD   dwSize;  
        if   (GetPrinter(PrnHandle,2,buf,sizeof(buf),  
            &dwSize))   {  
            PRINTER_INFO_2*   pInfo;  
            pInfo   =   (PRINTER_INFO_2*)buf;  
            //pInfo->Status   灝辨槸鎵撳嵃鏈虹殑鐘舵侊紝璇︾粏鐨勪唬鐮佸彲浠?nbsp; 
            //鍙傝winspool.h涓互PRINTER_STATUS寮澶寸殑瀹忓畾涔?nbsp; 
            if(pInfo->Status==PRINTER_STATUS_PAUSED)  
                AfxMessageBox("a");  
            else   if(pInfo->Status==PRINTER_STATUS_PENDING_DELETION)  
                AfxMessageBox("b");  
            ///////////浠ヤ笂pInfo->Status浠g爜璇曢獙涓嶆垚鍔燂紝鍝綅鐭ラ亾鍘熷洜璇峰憡鐭ワ紝璋㈣阿
            if (pInfo->Attributes&PRINTER_ATTRIBUTE_WORK_OFFLINE)//嫻嬭瘯鎴愬姛
            {
                AfxMessageBox("offline");
            }
            else
            {
                AfxMessageBox("online");
            }
        }  
        ClosePrinter(PrnHandle);
    }

涓婇潰鏄垽鏂墦鍗版満鏄惁榪炴満鐨勩?br>涓嬮潰鏄垽鏂墦鍗頒換鍔℃槸鍚︽甯稿畬鎴愮殑錛?br>    SetTimer(1,500,NULL);//鐢ㄥ畾鏃跺櫒鏉ュ畬鎴?br>
鍝嶅簲鍑芥暟錛?br>switch(nIDEvent)
    {
    case 1:
        {
            JOB_INFO_2  *pJobs;
       int         cJobs,
                   i;
       DWORD       dwPrinterStatus;
       if (!GetJobs(hPrinter, &pJobs, &cJobs, &dwPrinterStatus))
            return ;

       for (i=0; i < cJobs; i++)
       {
           if (pJobs[i].Status &
                   (JOB_STATUS_ERROR |
                   JOB_STATUS_OFFLINE |
                   JOB_STATUS_PAPEROUT |
                   JOB_STATUS_BLOCKED_DEVQ))
               {                  
                   KillTimer(1);
                   AfxMessageBox(pJobs[i].pDocument);
                   free( pJobs );
                   return ;
               }
       }
       free( pJobs );
        }
        break;
    default:
        break;
    }

鐢ㄥ埌鐨勬柟娉曪細(xì)
BOOL GetJobs(HANDLE hPrinter,        /* Handle to the printer. */
                JOB_INFO_2 **ppJobInfo, /* Pointer to be filled.  */
                int *pcJobs,            /* Count of jobs filled.  */
                DWORD *pStatus)         /* Print Queue status.    */
   {

   DWORD               cByteNeeded,
                        nReturned,
                        cByteUsed;
    JOB_INFO_2          *pJobStorage = NULL;
    PRINTER_INFO_2       *pPrinterInfo = NULL;

   /* Get the buffer size needed. */
       if (!GetPrinter(hPrinter, 2, NULL, 0, &cByteNeeded))
       {
           if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
               return FALSE;
       }

       pPrinterInfo = (PRINTER_INFO_2 *)malloc(cByteNeeded);
       if (!(pPrinterInfo))
           /* Failure to allocate memory. */
           return FALSE;

       LPCSTR str="sssssssssss";
       /* Get the printer information. */
       if (!GetPrinter(hPrinter,2,(unsigned char *)(LPSTR)pPrinterInfo,cByteNeeded,&cByteUsed))
       {
           /* Failure to access the printer. */
           free(pPrinterInfo);
           pPrinterInfo = NULL;
           return FALSE;
       }

       /* Get job storage space. */
       if (!EnumJobs(hPrinter,
               0,
               pPrinterInfo->cJobs,
               2,
               NULL,
               0,
               (LPDWORD)&cByteNeeded,
               (LPDWORD)&nReturned))
       {
           if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
           {
               free(pPrinterInfo);
               pPrinterInfo = NULL;
               return FALSE;
           }
       }

       pJobStorage = (JOB_INFO_2 *)malloc(cByteNeeded);
       if (!pJobStorage)
       {
           /* Failure to allocate Job storage space. */
           free(pPrinterInfo);
           pPrinterInfo = NULL;
           return FALSE;
       }

       ZeroMemory(pJobStorage, cByteNeeded);

       /* Get the list of jobs. */
       if (!EnumJobs(hPrinter,
               0,
               pPrinterInfo->cJobs,
               2,
               (LPBYTE)pJobStorage,
               cByteNeeded,
               (LPDWORD)&cByteUsed,
               (LPDWORD)&nReturned))
       {
           free(pPrinterInfo);
           free(pJobStorage);
           pJobStorage = NULL;
           pPrinterInfo = NULL;
           return FALSE;
       }

       /*
        *  Return the information.
        */
       *pcJobs = nReturned;
       *pStatus = pPrinterInfo->Status;
       *ppJobInfo = pJobStorage;
       free(pPrinterInfo);

       return TRUE;

   }


闇瑕佹彃鍏ュご鏂囦歡#include <winspool.h>



]]>
久久综合88熟人妻| 久久久精品久久久久久| 国产精品久久网| 人人狠狠综合久久亚洲婷婷| 精品久久人人爽天天玩人人妻| 久久综合精品国产一区二区三区 | 99久久国产综合精品网成人影院| 久久精品国产精品亚洲人人| 亚洲精品无码久久一线| 久久久久婷婷| 国产精品久久久久久搜索| 亚洲va久久久久| 国产精品99久久久久久董美香| 亚洲精品无码专区久久久| 伊人久久精品影院| 9久久9久久精品| 亚洲综合伊人久久综合| 伊人久久大香线焦AV综合影院| 久久精品亚洲乱码伦伦中文| 久久99国产精品久久久| 亚洲va久久久噜噜噜久久男同| 亚洲中文字幕伊人久久无码 | 久久精品国产99国产精偷| 日韩乱码人妻无码中文字幕久久| 怡红院日本一道日本久久 | 久久国产视频网| 日日躁夜夜躁狠狠久久AV| 亚洲成色WWW久久网站| yy6080久久| 久久久久久国产精品无码下载 | 久久久九九有精品国产| 精品国产91久久久久久久| 久久99国产亚洲高清观看首页| 丁香狠狠色婷婷久久综合| 国产精品九九九久久九九| 国产精品一区二区久久| 天天综合久久久网| 夜夜亚洲天天久久| 国产高潮久久免费观看| 欧美一级久久久久久久大片 | 久久不射电影网|