<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++/CLI/Managed C++ Extension</title><link>http://blog.csdn.net/jiangsheng/category/90383.aspx</link><description /><dc:language>zh-CN</dc:language><lastUpdateTime>Mon, 07 Apr 2008 15:48:43 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>蒋晟.Net</dc:creator><title>Jiangsheng的CSDN Digest(April 3, 2006)</title><link>http://blog.csdn.net/jiangsheng/archive/2006/04/03/648980.aspx</link><pubDate>Mon, 03 Apr 2006 13:45:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2006/04/03/648980.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/648980.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2006/04/03/648980.aspx#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/648980.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=648980</trackback:ping><description> 为了便于搜索,这里尽可能保留了论坛上讨论的原文，但是这并不表示本人赞同帖子中的表述方式和观点。 
CSDN 讨论总结系列：

Jiangsheng的CSDN Digest(March 4, 2006) (http://blog.csdn.net/jiangsheng/archive/2006/03/05/615714.aspx)
Jiangsheng的CSDN Digest (Jan 21 2006)( http://blog.csdn.net/jiangsheng/archive/2006/03/05/615669.aspx) 
Jiangsheng的CSDN Digest (Jan 7 2006)（http://blog.csdn.net/jiangsheng/archive/2006/01/07/573288.aspx） 
Jiangsheng的CSDN Digest (Jan 1 2006)http://blog.csdn.net/jiangsheng/archive/2006/01/01/568362.aspx 
Jiangsheng的CSDN Digest &lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/648980.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>Jiangsheng的CSDN Digest (Oct 2005)</title><link>http://blog.csdn.net/jiangsheng/archive/2005/12/27/563274.aspx</link><pubDate>Tue, 27 Dec 2005 00:16:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/12/27/563274.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/563274.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/12/27/563274.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/563274.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=563274</trackback:ping><description>jiangsheng在2005年9月-10月之间参与的CSDN已结贴子的摘要&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/563274.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>Jiangsheng的CSDN Digest (Dec 2005)</title><link>http://blog.csdn.net/jiangsheng/archive/2005/12/24/561501.aspx</link><pubDate>Sat, 24 Dec 2005 20:24:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/12/24/561501.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/561501.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/12/24/561501.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/561501.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=561501</trackback:ping><description>jiangsheng在2005年11月-12月之间参与的CSDN已结贴子的摘要&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/561501.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>Visual C++ 2005 中的XML注释</title><link>http://blog.csdn.net/jiangsheng/archive/2005/11/05/523786.aspx</link><pubDate>Sat, 05 Nov 2005 18:57:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/11/05/523786.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/523786.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/11/05/523786.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/523786.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=523786</trackback:ping><description>C#程序员可以用三个斜杠来开始XML格式的注释，而且编译器可以据此生成可用于自动生成帮助文档的XML文件。Visual C++ 2005中的编译器也支持了这个功能，而且对非托管函数也生效，前提是必须打开/clr和/DOC开关，并且不能使用/clr:oldSyntax开关编译。&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/523786.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>托管C++中函数调用的双重转换(Double Thunking)</title><link>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497936.aspx</link><pubDate>Sat, 08 Oct 2005 21:53:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497936.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/497936.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497936.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/497936.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=497936</trackback:ping><description> 在VC.Net中使用默认设置/clr编译时，一个托管函数会产生两个入口点，一个是托管的，供托管代码调用，另外一个是非托管的，供非托管代码调用。但是函数地址，特别是虚函数指针只能有一个值，所以需要有一个默认的入口。

非托管入口点可能是所有调用的默认入口（在 Visual Studio .NET2003 中，编译器总是会选择非托管入口，但是在Visual Studio 2005中，如果参数或者返回值中包含托管类型，那么编译器会选择托管入口），而另外一个只是使用托管C++中的互操作功能对默认入口的调用。在一个托管函数被另一个托管函数调用的时候，这可能会造成不必要的托管/非托管上下文切换和参数/返回值的复制。如果函数不会被非托管代码使用指针调用，那么可以在声明函数时用VC2005新增的__clrcall修饰符阻止编译器生成两个入口。
现在用简单的冒泡排序算法来比较一下使用__clrcall之后的性能改善程度。 
using namespace System;
#define ARRAY_SIZE 1000

struct bubbleBase
{
	int value;&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/497936.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>西雅图MVP峰会见闻</title><link>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497930.aspx</link><pubDate>Sat, 08 Oct 2005 21:50:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497930.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/497930.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497930.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/497930.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=497930</trackback:ping><description>个人觉得这次MVP峰会最大的进步就是技术相关的Session数量大大增加，按照MVP专长来分类；而不像上次那样按主题分类。我只需要在VC产品组的日程里面选择就可以了，而不是像上回那样不得不去听移动开发。当然这回也有MVP不去参加VC的Session，跑去听IE和移动开发。内容方面也比上次活泼很多，Don Box还是那么幽默，比尔·盖茨也有搞笑的演出，不过他看起来比去年七月份在北京的时候老多了。

一些可能有人会感兴趣的技术信息

新的产品开发合作网站http://connect.microsoft.com/。在这里可以申请参与新产品的测试。
软件开发者可以使用Windows错误报告机制（Windows Error Reporting，简称WER，https://winqual.microsoft.com/parentorgs.asp）来获得反馈。 
有人正在开发把VC项目转化成MSBuild的XML格式的工具 (
http://blogs.msdn.com/clichten/archive/2005/06/07/Building_VC_projects_with_msbu&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/497930.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>C++/CLI中的默认属性访问</title><link>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497924.aspx</link><pubDate>Sat, 08 Oct 2005 21:47:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497924.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/497924.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/10/08/497924.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/497924.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=497924</trackback:ping><description>目前版本的VC2005测试版中，default关键字不仅用于指定类级别的索引器，而且也用于访问默认属性。但是奇怪的是，默认属性的原名不能访问了，也就是说，如果要把下面的代码段从托管C++移植到VC2005附带的C++/CLI，不仅需要更改指针的类型，而且要把属性的名称更改为default：

//[System::Reflection::DefaultMemberAttribute("Fields")] interface _Recordset

//托管C++语法
//extern _Recordset* results;
Fields* ResultFields=results-&gt;Fields;

//C++/CLI语法
//extern _Recordset^ results;
Fields^ ResultFields=results-&gt;default;

如果继续使用原来名字来访问属性的话，会报告编译错误：

Fields^ ResultFields=results-&gt;Fields;//C3293: 'Fields': use 'default' t&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/497924.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>Win32 &amp; .Net Q&amp;A 200509</title><link>http://blog.csdn.net/jiangsheng/archive/2005/09/13/480540.aspx</link><pubDate>Tue, 13 Sep 2005 22:06:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/09/13/480540.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/480540.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/09/13/480540.aspx#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/480540.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=480540</trackback:ping><description>I would like to keep tracking some interesting discussions, but sometimes I can not find them due to the limit of the CSDN favorite and the CSDN full text search. So again I list some interesting discussions here. For details about the discussion, go to http://search.csdn.net and search posts by their topics. For previous Q&amp;A discussions, see my blogs Win32 &amp; .Net Q&amp;A  and VC/MFC Q&amp;A 200407 . A topic may appear in these Q&amp;A blogs more than once, but I will try to cover every interesting discussi&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/480540.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>示例：在MFC程序中集成.Net中的控件</title><link>http://blog.csdn.net/jiangsheng/archive/2005/03/19/323425.aspx</link><pubDate>Sat, 19 Mar 2005 05:13:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/03/19/323425.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/323425.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/03/19/323425.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/323425.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=323425</trackback:ping><description>从.Net Framework 1.1开始，.Net控件可以以ActiveX的方式被集成到非托管宿主中——但是官方的支持只对于使用托管C++的MFC程序。Chris Sells在2003年3月份的MSDN杂志中描述了这样一个示例（http://msdn.microsoft.com/msdnmag/issues/03/03/WindowsForms/default.aspx）。这个示例使用的代码稍微繁琐，而且没有描述如何处理控件的事件。MFC 8.0增加了一系列这方面的支持来把这个集成过程简单化（参考http://msdn2.microsoft.com/library/ahdd1h97.aspx）。这使得在MFC程序中使用.Net中的一些比较好用的类，例如System::Windows::Forms::PropertyGrid比以前容易多了。



举例来说，要在MFC的基于对话框的程序中使用System::Windows::Forms::PropertyGrid控件，首先创建一个基于对话框的程序，添加必要的引用:

#include // MFC Windows For&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/323425.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>jiangsheng</dc:creator><title>《转换指南: 将程序从托管扩展C++迁移到C++/CLI》译后记</title><link>http://blog.csdn.net/jiangsheng/archive/2005/03/17/321740.aspx</link><pubDate>Thu, 17 Mar 2005 07:28:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/03/17/321740.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/321740.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/03/17/321740.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/321740.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=321740</trackback:ping><description>终于把Stan Lippman先生的这篇文章译完了。从去年4月在全球MVP峰会上拿到这篇文章的手稿到现在，差不多一年过去了。虽然当时的Visual Studio 2005还不支持一些语法，但是我和董颖涛对新的C++/CLI语言都很感兴趣，在当时就讨论过翻译的问题。之后我就开始翻译这篇文章，但是进度一直很慢——主要是杂务太多、语言上的困难（尽量避免误解和词不达意的情况，以及斟酌用词的选择）。在1月份完成了全文之后，看到了Sunhui的一篇文章（http://community.csdn.net/expert/Topicview1.asp?id=3834281），觉得附录里面讲到的一些内容或许一些人也有兴趣，所以继续翻译附录的工作，幸好现在是春假，比较有时间，终于在今天完成了。译文目前在http://blog.csdn.net/jiangsheng/archive/2004/10/18/140450.aspx可以访问，希望读者指正。

在翻译过程中得到了曾毅的帮助，得以联系到Stan Lippman先生，在此一并感谢。

文章简介：

C++/CLI代表ISO-C++标准语言的&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/321740.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>jiangsheng</dc:creator><title>十年MFC经历认识的Microsoft技术[转]</title><link>http://blog.csdn.net/jiangsheng/archive/2005/03/11/316924.aspx</link><pubDate>Fri, 11 Mar 2005 04:08:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/03/11/316924.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/316924.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/03/11/316924.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/316924.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=316924</trackback:ping><description>在CSDN看见一个老程序员的感想，虽然是关于MFC的讨论，但是对其他语言的开发者也有借鉴之处。

转自CSDN技术社区(http://community.csdn.net)，更多内容可以在http://community.csdn.net/expert/Topicview1.asp?id=3834281 找到。

作　　者：  sunhui (MFC.NET)  

一、初识MFC
    我最初知道MFC大概是在1993年，那个时候Visual C++还没面世，当时Microsoft的C++编译器还很弱，官方的名字是Microsoft C/C++ 7.0，MFC的版本是1.0，几乎没有引起什么反响，那个时期最好的C++开发环境是Borland C++ 3.1，其实，大概是1992年11月份，一个偶然的机会，我领略到Borland公司的厉害，记不得在什么地方，我看到一个绝妙的集成开发环境，即Turbo C++ 3.0 for Windows，这是我记忆中第一个真正的Windows环境下的C++集成开发环境，那种激动的感觉至今仍记忆犹新，不客气的说，当时至少在C++方面，M&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/316924.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>蒋晟.Net</dc:creator><title>Win32 &amp; .Net Q&amp;A</title><link>http://blog.csdn.net/jiangsheng/archive/2005/02/28/304654.aspx</link><pubDate>Mon, 28 Feb 2005 08:00:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2005/02/28/304654.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/304654.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2005/02/28/304654.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/304654.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=304654</trackback:ping><description>jiangsheng收集的CSDN论坛问答摘要&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/304654.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>jiangsheng</dc:creator><title>在richedit控件中插入动态GIF</title><link>http://blog.csdn.net/jiangsheng/archive/2004/12/15/217181.aspx</link><pubDate>Wed, 15 Dec 2004 14:46:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2004/12/15/217181.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/217181.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2004/12/15/217181.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/217181.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=217181</trackback:ping><description>这是CSDN的VC论坛上的一个老FAQ了。我在写自定义在RichEdit中插入对象的图标（http://www.blogcn.com/user3/jiangsheng/blog/1319738.html）这片文章的时候就是想用这个技术做动画GIF的，但是怎么判断一个内嵌在RichEdit的对象是GIF这个问题一直没有解决。好在QQ附带的一个控件支持动画GIF，可以插入这个对象来解决问题。&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/217181.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>jiangsheng</dc:creator><title>转换指南: 将程序从托管C++扩展迁移到C++/CLI</title><link>http://blog.csdn.net/jiangsheng/archive/2004/10/18/140450.aspx</link><pubDate>Mon, 18 Oct 2004 02:26:00 GMT</pubDate><guid>http://blog.csdn.net/jiangsheng/archive/2004/10/18/140450.aspx</guid><wfw:comment>http://blog.csdn.net/jiangsheng/comments/140450.aspx</wfw:comment><comments>http://blog.csdn.net/jiangsheng/archive/2004/10/18/140450.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/jiangsheng/comments/commentRss/140450.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=140450</trackback:ping><description>摘要: C++/CLI代表一个ISO-C++语言标准的动态范型扩展。本文列举了V1版本语言的特色以及它们在V2版本中的对应（如果存在）；并指出为不存在相应对应的V1特色构建的语言特性。(68打印页)&lt;img src ="http://blog.csdn.net/jiangsheng/aggbug/140450.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>