<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_7 years C/C++/C# programing, focus on embedded and mobile device development.</title><subtitle type="text"/><id>http://feed.cnblogs.com/blog/u/22452/rss</id><updated>2011-08-31T06:44:30Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/22452/rss"/><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2011/08/31/2160717.html</id><title type="text">MAC OS中的dylib 的@rpath和@loader_path小问题</title><summary type="text">dylib 的@rpath和@loader_path小问题</summary><published>2011-08-31T06:45:00Z</published><updated>2011-08-31T06:45:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2011/08/31/2160717.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2011/08/31/2160717.html"/><content type="html">&lt;div&gt;MAC OS 里面开发真是古怪，我的程序分为通用的dylib和应用层APP，调试通过，可以通过XCODE启动程序，调用dylib也成功，但是直接点击EXE启动不了，找不到dylib文件，可以我已经在dylib项目中设置了@rpath了，而且在APP项目中也设置了@loader_path，在xcode4中折腾了半天没有解决，没办法又换回xcode3，我记得以前在xcode3中是可以的啊？！ 重新回到xcode3中，又测试了一下，奇怪，也不行！！！后来鬼使神差的在@loader_path后面加了一个/ 居然可以了，我晕啊，估计xcode4中也是这个问题，马上就测试xcode4。&lt;/div&gt;&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/2160717.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2011/08/31/2160717.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2011/06/10/2077389.html</id><title type="text">有几个人知道C语言中int8_t, uint8_t, time_t ... 等等数据类型中的_t是什么意思</title><summary type="text">我知道应该是编程约定，但为什是＿ｔ</summary><published>2011-06-10T02:44:00Z</published><updated>2011-06-10T02:44:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2011/06/10/2077389.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2011/06/10/2077389.html"/><content type="html">&lt;div&gt;编程6年多，回头看《C和指针》，颇有感触。&lt;br /&gt;&lt;br /&gt;在嵌入式编程中经常接触uint8_t, int8_t等等固定宽度的数据类型， 它们是C99中新增的标准类型，即使不搞嵌入式编程，也经常遇到_t结尾的类型定义，可能很多人从来没有想过这个问题：为什么要加一个_t，t表示什么意思？吨？ 呵呵今天我突然想到这个问题，就GOOGLE了一下。&lt;br /&gt;&lt;br /&gt;其实这是一个编程习惯、命名约定，就好象for循环中使用i,j,k作为循环变量名一样。t是type的简称，并不是吨。&lt;br /&gt;&lt;br /&gt;下面是英文讨论贴：&lt;br /&gt;http://zh-cn.w3support.net/index.php?db=so&amp;amp;id=231760&lt;/div&gt;&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/2077389.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2011/06/10/2077389.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2011/04/12/2014233.html</id><title type="text">无线路由器总是提示输入的密码错误</title><summary type="text">无线路由器总是提示输入的密码错误，很可能是频段冲突哦。</summary><published>2011-04-12T15:05:00Z</published><updated>2011-04-12T15:05:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2011/04/12/2014233.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2011/04/12/2014233.html"/><content type="html">无线路由器最近总是不稳定，连接有ipad和ipod，总是提示输入密码，输入正确的密码后又提示密码不正确，老婆又催的紧，真是抓狂！以前都没有问题的。 重启了几次路由器，正常一会，又不行了。 后来留意到一个选项：频段，我的频段是6，选项从1到15？ 怀疑是不是周围路由器太多了，有频段冲突，将6改成4，重启，一切OK了，爽啊。&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/2014233.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2011/04/12/2014233.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2011/04/07/2007697.html</id><title type="text">I2C中的重复起始条件到底是什么意思</title><summary type="text">I2C中的起始条件和结束条件，可以理解，但什么是重复起始条件？很多地方都有提到，但都没给解释。实际上，当有多个master时，类似于多线程中的同步和互斥，为了防止I2C在多个“起始-结束”之间的通信被另外一个Master，保证“原子性”，就可以在发出起始条件后，再继续发出起始条件，最中一次性的发出结束条件。</summary><published>2011-04-07T03:49:00Z</published><updated>2011-04-07T03:49:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2011/04/07/2007697.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2011/04/07/2007697.html"/><content type="html">&lt;div&gt;&lt;p&gt;During an I2C transfer there is  often the need to first send a command and then read back an answer  right away. This has to be done without the risk of another  (multimaster) device interrupting this atomic operation. The I2C  protocol defines a so-called repeated start condition. After having sent  the address byte (address and read/write bit) the master may send any  number of bytes followed by a stop condition. Instead of sending the  stop condition it is also allowed to send another start condition again  followed by an address (and of course including a read/write bit) and  more data. This is defined recursively allowing any number of start  conditions to be sent. The purpose of this is to allow combined  write/read operations to one or more devices without releasing the bus  and thus with the guarantee that the operation is not interrupted.&lt;/p&gt;&lt;div csc-textpic-left="" csc-textpic-above=""&gt;&lt;div csc-textpic-single-image=""&gt;&lt;img src="http://www.i2c-bus.org/typo3temp/pics/624a4fcaab.gif" alt="" border="0" height="104" width="600" /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Regardless of the number of start conditions sent during one transfer the transfer must be ended by exactly one stop condition.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/2007697.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2011/04/07/2007697.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997790.html</id><title type="text">release, retain, autorelease 与 AT, MT, AMT</title><summary type="text">Objective C 中的release, retain, autorelease再加上垃圾回收，对于初学者经常搞的晕头转向，很难彻底理解，既然有release，为何还要autorelease？ autorelease是否就是垃圾回收？ 我们结合汽车变速箱中离合器的控制来理解一下。</summary><published>2011-03-28T07:56:00Z</published><updated>2011-03-28T07:56:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997790.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997790.html"/><content type="html">&lt;div&gt;Objective C 中的release, retain, autorelease再加上垃圾回收，对于初学者经常搞的晕头转向，很难彻底理解，既然有release，为何还要autorelease？ autorelease是否就是垃圾回收？ 我们结合汽车变速箱中离合器的控制来理解一下。&lt;br /&gt;&lt;br /&gt;可以这样简化来考虑：&lt;br /&gt;一，没有垃圾回收&lt;br /&gt;&lt;br /&gt;retain/release是最基本的，一个增加计数，一个减少引用计数，创建对象后，我们只要适当的时候release就ok了。&lt;br /&gt;&lt;br /&gt;autorelease一般用在stringWithString这样比较爽的对象创建+初始化的静态函数中，跟release差不多，唯一的区别是你不用手工去release了，相当于在后台有一个机器人帮你release。&lt;br /&gt;&lt;br /&gt;二，有垃圾回收&lt;br /&gt;基本上可以忘掉release和autorelease了，只是适当的时候用一下retain，防止被系统过早回收。&lt;br /&gt;&lt;br /&gt;这让我联想到汽车变速系统中的AT, MT, AMT，对于离合器的处理方法：&lt;br /&gt;&lt;br /&gt;MT是手动档，要你自己踩离合，相当于release&lt;/div&gt;&lt;p&gt;AT是自动档，没有离合了，相当于系统垃圾回收&lt;br /&gt;&lt;/p&gt;&lt;p&gt;AMT是在手动档的基础上实现的自动换档功能，相当于请了一个司机来帮你踩离合，相当于autorelease，表面上看你都不用自己踩离合和release了，实际上背后有个人帮你做。&lt;/p&gt;&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/1997790.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997790.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997775.html</id><title type="text">有关 stringWithString 和 initWithString</title><summary type="text">半路出家的Objective C开发者，由于缺少系统性的学习，经常遇到很多困惑的问题，比如NSString类，在创建和初始化对象的时候往往不知道是用 stringWithString或是initWithString，一个是静态的对象分配和初始化函数，一个又需要先alloc一下：</summary><published>2011-03-28T07:41:00Z</published><updated>2011-03-28T07:41:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997775.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997775.html"/><content type="html">&lt;div&gt;半路出家的Objective C开发者，由于缺少系统性的学习，经常遇到很多困惑的问题，比如NSString类，在创建和初始化对象的时候往往不知道是用stringWithString或是initWithString，一个是静态的对象分配和初始化函数，一个又需要先alloc一下：&lt;br /&gt;&lt;br /&gt;[NSString stringWithString:@""]&lt;br /&gt;[[NSString alloc] initWithString:@""]&lt;br /&gt;&lt;br /&gt;这2种类型的参数完全相同，只是一个多了alloc。那么问题出来了：什么时候用第一种，什么时候用第2种，貌似第一种代码量要少一点。&lt;br /&gt;&lt;br /&gt;查阅了cocoa 设计模式之后，发现apple这样设计是由原因的。 apple 将对象的创建和初始化分开为2个阶段，先alloc分配内存，在init初始化内存，这样m种分配函数和n种初始化函数就会有m*n种组合，而在c++/c#中则必须要写m*n个构造函数，而objective c中就只有m+n个函数，这样就非常灵活。&lt;br /&gt;&lt;br /&gt;书上就是这样说的，但是我们常见的alloc只有1个，就是alloc自己，很少看到allocWithXXX的分配函数，就是说m的值是1，这样跟c++/c#本质上就是一样的了，因此会觉得[[xxx alloc] init]会很繁琐！ 实际上在计算机的早期，由于内存太少，内存管理没有那么强大，很多时候需要程序员管理，当时有一个allocWithZone函数，控制对象被分配在内存的哪个区域，程序员可以控制相关的对象分配在1个zone，这样就不会出现A对象在物理内存，而相关的B对象在Page文件中的情况。 alloc 内部实际上是调用allocWithZone来实现的。 到了现在，内存已经不是什么问题了，因此allocWithZone很少直接使用了，没有必要了，因此一般都用alloc函数。&lt;br /&gt;&lt;br /&gt;历史就是这样发展的。&lt;br /&gt;&lt;br /&gt;那什么时候使用stringWithString这样的静态函数？什么时候组合使用alloc和init呢？要从stringWithString的实现来分析，大概是这样实现的：&lt;br /&gt;NSString* ret=[[[NSString alloc] initWithString:@"xxx"] autorelease];&lt;br /&gt;return ret;&lt;br /&gt;&lt;br /&gt;其实它内部也是先alloc再init的，只是多调用了autorelease这个函数，跟我们自己写的差不多。&lt;br /&gt;&lt;br /&gt;autorelease涉及到内存管理方面的问题，先不多说。 &lt;br /&gt;&lt;br /&gt;直接给出结论：stringWithString适合临时变量，在一个函数体内部使用，你不用调用release函数，不太适合return到函数体外面，否则要[retain]一下，否则有时候你会发现这个对象变成nil了。&lt;br /&gt;&lt;br /&gt;而alloc和init组合则适合在函数之间传递参数，用完之后需要手工release. &lt;br /&gt;&lt;br /&gt;当打开垃圾收集的功能后，2种方法就差不多了。&lt;/div&gt;&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/1997775.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2011/03/28/1997775.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893294.html</id><title type="text">lpc1343 usb isp not work in linux and mac</title><summary type="text">I tested the lpc1343 usb isp in linux, it doesn't work. Even I can see the disk and file, remove firmware.bin, copy new firmware, but when I power on device normally next time, no firmware is running !!!</summary><published>2010-12-01T05:13:00Z</published><updated>2010-12-01T05:13:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893294.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893294.html"/><content type="html">&lt;p&gt;I tested the lpc1343 usb isp in linux, it doesn't work. Even I can see the disk and file, remove firmware.bin, copy new firmware, but when I power on device normally next time, no firmware is running !!!&lt;br /&gt;&amp;nbsp;&lt;br /&gt;It does not have a full support of FAT12 file system.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Following link is a discussion about 1343 in linux, seem there is no way to make it work in linux.&lt;br /&gt;&lt;a href="http://www.listware.net/201007/linux-usb/99948-lpc1343-usb-isp-trouble.html"&gt;http://www.listware.net/201007/linux-usb/99948-lpc1343-usb-isp-trouble.html&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;It also not work in apple's mac.&lt;/p&gt;&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/1893294.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893294.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893259.html</id><title type="text">C#平台互操作部署问题</title><summary type="text">程序中使用了平台互操作p/invoke在C#中调用MFC的DLL，在安装有VS2008开发环境的系统中程序均可正常运行，但是复制到其它机器上就不行了，.NET FRAMEWARK也都是最新版本，不知道怎么办。</summary><published>2010-12-01T04:30:00Z</published><updated>2010-12-01T04:30:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893259.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893259.html"/><content type="html">&lt;p&gt;程序中使用了平台互操作p/invoke在C#中调用MFC的DLL，在安装有VS2008开发环境的系统中程序均可正常运行，但是复制到其它机器上就不行了，.NET FRAMEWARK也都是最新版本，不知道怎么办。&lt;/p&gt;&#xD;
&lt;p&gt;A.dll 是别人用VC6.0开发的，里面导出了一个类,没有源码。&lt;br /&gt;B.dll 是对A.dll的一个包装，VC++2008开发,将类的成员函数包装成全局函数，并导出。&lt;br /&gt;C.dll 是对B.dll的一个包装, C#开发,使用P/Invoke调用B.dll中的函数.&lt;br /&gt;D.exe 是最终程序,引用了C.dll&lt;/p&gt;&#xD;
&lt;p&gt;后来用Depends.exe分析,发现最终Debug目录中的B.dll使用了MSVCR90D.dll,奇怪的是这个文件却找不到,在安装了VS的机器上,即使找不到也能运行.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img height="634" alt="" src="http://images.cnblogs.com/cnblogs_com/swnuwangyun/0001.jpg" width="1080" border="0" /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;查了一些资料有说MSVCR100.dll可能有一个BUG, 跟编译模式也有关系, 于是使用RELEASE编译, 问题解决,到处都能运行了.&lt;/p&gt;&#xD;
&lt;p&gt;继续用Depends.exe分析,发现Release模式下的B.dll使用了MSVCR90.dll, 少了一个D结尾,应该是调试版本和正式版本之分. 此时才想到装了VS的环境里面有很多用于调试的DLL,而这些D结尾的DLL在安装MS的VC++2008可分发包的时候是没有包含的,因此导致了问题.&lt;br /&gt;&lt;img height="634" alt="" src="http://images.cnblogs.com/cnblogs_com/swnuwangyun/0002.jpg" width="1080" border="0" /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;所以,一定不要图省事,把DEBUG版本的拿出来给用户用. 我知道很多人有都有这个习惯,坏习惯!!! 如果不早点客服，以后早晚会付出更大的代价来发现由此导致的问题。&lt;/p&gt; &lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/1893259.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2010/12/01/1893259.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2010/03/22/1691599.html</id><title type="text">C++Builder中的异常传递</title><summary type="text">C++Builder中函数之间的异常传递</summary><published>2010-03-22T06:41:00Z</published><updated>2010-03-22T06:41:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2010/03/22/1691599.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2010/03/22/1691599.html"/><content type="html">&lt;div&gt;以HTTP GET为例，需要去服务器获取网页内容，为防止出错，重试3次，在最后一次重试失败时才抛出异常，前两次的异常我们都会忽略。在C#中通常这样处理：&lt;/div&gt;&lt;div&gt;for(int i=0;i&amp;lt;3;i++)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;try&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;...&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;catch(Exception e)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(i==2)&lt;/div&gt;&lt;div&gt;&lt;span  style="white-space:pre"&gt;	&lt;/span&gt;throw e;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;有几年没用C++Builder了，当我把这段代码搬到C++Builder中时，最初是这样：&lt;/div&gt;&lt;div&gt;for(int i=0;i&amp;lt;3;i++)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;try&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;...&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;catch(TException &amp;amp;e)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(i==2)&lt;/div&gt;&lt;div&gt;&lt;span  style="white-space:pre"&gt;	&lt;/span&gt;throw &amp;amp;e;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;然后在上层函数调用，捕捉异常，打印到日志。结果总是在打印日志的时候出现问题，程序僵死了，无法继续运行了。&lt;/div&gt;&lt;div&gt;后来突然想到犯了一个低级错误：应该用throw new TException(e)，而不是throw &amp;amp;e; 在C++Builder中e是一个栈变量，而在C#中e是一个堆变量。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;因此在C#中可以直接传递e，而在C++Builder中去需要重新new一个，将原来的e作为构造函数来抛出。&lt;/div&gt;&lt;img src="http://www.cnblogs.com/swnuwangyun/aggbug/1691599.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/swnuwangyun/archive/2010/03/22/1691599.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/swnuwangyun/archive/2009/09/24/1573425.html</id><title type="text">Windows mobile 中获取内存使用情况</title><summary type="text">Windows mobile 中获取内存使用情况</summary><published>2009-09-24T08:44:00Z</published><updated>2009-09-24T08:44:00Z</updated><author><name>woaiusd</name><uri>http://www.cnblogs.com/swnuwangyun/</uri></author><link rel="alternate" href="http://www.cnblogs.com/swnuwangyun/archive/2009/09/24/1573425.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/swnuwangyun/archive/2009/09/24/1573425.html"/></entry></feed>
