﻿<?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++博客-alantop's blog-随笔分类-VC源码</title><link>http://www.cppblog.com/alantop/category/19712.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 18 Jul 2018 14:19:48 GMT</lastBuildDate><pubDate>Wed, 18 Jul 2018 14:19:48 GMT</pubDate><ttl>60</ttl><item><title>控制台程序隐藏本身，也隐藏启动的控制台程序</title><link>http://www.cppblog.com/alantop/archive/2018/07/17/215789.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 17 Jul 2018 14:22:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2018/07/17/215789.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/215789.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2018/07/17/215789.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/215789.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/215789.html</trackback:ping><description><![CDATA[<br /><div>隐藏本身，分为如下几步，缺一不可：</div><div>第一步 &nbsp;#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )</div><div></div><div>后者完整一点的：</div><div></div><div>#ifdef _ConsoleDisappear &nbsp;</div><div>#pragma comment( linker, "/subsystem:/"windows/" /entry:/"wmainCRTStartup/"") &nbsp;&nbsp;</div><div>#else &nbsp;</div><div>#pragma comment( linker, "/subsystem:/"windows/" /entry:/"mainCRTStartup/"") &nbsp;</div><div>#endif&nbsp;</div><div>第二步：Project----&gt;Properties---&gt;Linker---&gt;Advanced---&gt;Entery Point修改为"mainCRTStartup"。</div><div>第三步：Project----&gt;Properties---&gt;Linker---&gt;System--&gt;Subsystem改成Windows（/SUBSYSTEM:WINDOWS）</div><div></div><div></div><div>隐藏启动程序</div><div>void ExecDOSCMD(char * szCommand)</div><div>{</div><div><span style="white-space:pre">	</span>STARTUPINFO si;</div><div><span style="white-space:pre">	</span>memset(&amp;si, 0, sizeof(STARTUPINFO));</div><div></div><div><span style="white-space:pre">	</span>// &nbsp; 进程信息 &nbsp; &nbsp;&nbsp;</div><div><span style="white-space:pre">	</span>PROCESS_INFORMATION &nbsp; pi;</div><div><span style="white-space:pre">	</span>si.cb = sizeof(STARTUPINFO);</div><div></div><div><span style="white-space:pre">	</span>// &nbsp; 取得当前进程的StartupInfo,并根据当前进程进行修改 &nbsp;&nbsp;</div><div><span style="white-space:pre">	</span>GetStartupInfo(&amp;si);</div><div><span style="white-space:pre">	</span>si.wShowWindow = SW_SHOW;</div><div><span style="white-space:pre">	</span>si.dwFlags = STARTF_USESHOWWINDOW;</div><div><span style="white-space:pre">	</span>si.wShowWindow = SW_HIDE;</div><div><span style="white-space:pre">	</span>char temp[4096] = "";//此处不加cmd /k</div><div><span style="white-space:pre">	</span>strcat(temp, szCommand);</div><div><span style="white-space:pre">	</span>CreateProcess(NULL, (LPSTR)(LPCTSTR)(temp), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &amp;si, &amp;pi);</div><div>}</div><div></div><div>ExecDOSCMD("demo.exe -d \\\\.\\usbpcap6 -o log");</div><img src ="http://www.cppblog.com/alantop/aggbug/215789.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2018-07-17 22:22 <a href="http://www.cppblog.com/alantop/archive/2018/07/17/215789.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>vc++ 2010 获取 本机所有ip地址和mac地址源码</title><link>http://www.cppblog.com/alantop/archive/2012/12/25/196621.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 25 Dec 2012 13:02:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2012/12/25/196621.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/196621.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2012/12/25/196621.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/196621.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/196621.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: vc++ 2010 获取 本机所有ip地址和mac地址源码&nbsp;&nbsp;<a href='http://www.cppblog.com/alantop/archive/2012/12/25/196621.html'>阅读全文</a><img src ="http://www.cppblog.com/alantop/aggbug/196621.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2012-12-25 21:02 <a href="http://www.cppblog.com/alantop/archive/2012/12/25/196621.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>vc 如何获得网卡的mac地址</title><link>http://www.cppblog.com/alantop/archive/2012/07/20/184359.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Fri, 20 Jul 2012 07:51:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2012/07/20/184359.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/184359.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2012/07/20/184359.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/184359.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/184359.html</trackback:ping><description><![CDATA[<a href="/Files/alantop/MACAddressChanger.rar">/Files/alantop/MACAddressChanger.rar</a><br /><br />vc获取mac地址<br />vc源码<br />使用编译器 vs2010 <br /><br /><img border="0" alt="" src="http://www.cppblog.com/images/cppblog_com/alantop/无标题.jpg" width="480" height="209" /><br /><br /><img src ="http://www.cppblog.com/alantop/aggbug/184359.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2012-07-20 15:51 <a href="http://www.cppblog.com/alantop/archive/2012/07/20/184359.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>推荐一本学习atl的好书 ATL Internals: Working with ATL 8 (2nd Edition) 含有配套源码</title><link>http://www.cppblog.com/alantop/archive/2009/11/10/100573.html</link><dc:creator>AlanTop</dc:creator><author>AlanTop</author><pubDate>Tue, 10 Nov 2009 03:04:00 GMT</pubDate><guid>http://www.cppblog.com/alantop/archive/2009/11/10/100573.html</guid><wfw:comment>http://www.cppblog.com/alantop/comments/100573.html</wfw:comment><comments>http://www.cppblog.com/alantop/archive/2009/11/10/100573.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cppblog.com/alantop/comments/commentRss/100573.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/alantop/services/trackbacks/100573.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 推荐一本学习atl的好书 ATL Internals: Working with ATL 8 (2nd Edition) 含有配套源码&nbsp;&nbsp;<a href='http://www.cppblog.com/alantop/archive/2009/11/10/100573.html'>阅读全文</a><img src ="http://www.cppblog.com/alantop/aggbug/100573.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/alantop/" target="_blank">AlanTop</a> 2009-11-10 11:04 <a href="http://www.cppblog.com/alantop/archive/2009/11/10/100573.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>