01 2013 档案

摘要:C++/CLI中使用gcnew关键字表示在托管堆上分配内存,并且为了与以前的指针区分,用^来替换* ,就语义上来说他们的区别大致如下:1)gcnew返回的是一个句柄(Handle),而new返回的是实际的内存地址;2)gcnew创建的对象由虚拟机托管,而new创建的对象必须自己来管理和释放。当然,从程序员的角度来说,管它是句柄还是什么其他的东西,总跑不掉是对某块内存地址的引用,实际上我们都可以理解成指针。int^p1 = gcnew int(); 利用gcnew,可以不用程序员释放申请的资源;int* p1 = new int(); delete p1; 利用new, 程序员必须手动释放申请的 阅读全文
posted @ 2013-01-31 11:21 nchxmoon 编辑
摘要:1. How to use MSXML2 in C++?First, we should import the "msxml6.tlb" file, the code as below: #import "..\Common\msxml6.tlb" raw_interfaces_only exclude("ISchemaElement", "ISchemaAttribute")Then we can use the MSXML2 interfaces now, take for an example:CoIniti 阅读全文
posted @ 2013-01-28 17:38 nchxmoon 阅读(311) 评论(0) 推荐(0) 编辑
摘要:You can get the free vesion in the website: http://www.jetbrains.com/profiler/. 阅读全文
posted @ 2013-01-28 10:58 nchxmoon 阅读(132) 评论(0) 推荐(0) 编辑
摘要:在main()中写有内存泄露的代码,通过调用_CrtDumpMemoryLeaks(); 方法,在Debug模式下,输出窗口就可以检测到内存泄露! 阅读全文
posted @ 2013-01-25 17:38 nchxmoon 阅读(155) 评论(0) 推荐(0) 编辑
摘要:expression.Address(RowAbsolute, ColumnAbsolute, ReferenceStyle, External, RelativeTo)expression 必需。该表达式返回上面的对象之一。RowAbsolute Variant 类型,可选。如果为 True,则以绝对引用方式返回对行的引用。 默认值为 True。ColumnAbsolute Variant 类型,可选。如果为 True,则以绝对引用方式返回对列的引用。默认值为 True。ReferenceStyle XlReferenceStyle 类型,可选。XlReferenceStyle 可为以下 . 阅读全文
posted @ 2013-01-24 09:56 nchxmoon 阅读(435) 评论(0) 推荐(0) 编辑
摘要:Dim arr As Variant ReDim arr(3, 4) Dim row As Long Dim col As Long row = UBound(arr, 1) col = UBound(arr, 2) 阅读全文
posted @ 2013-01-22 13:11 nchxmoon 阅读(7510) 评论(0) 推荐(0) 编辑
摘要:1. 开始执行以下命令: Subst b: %windir%\assembly .2. 执行完后,会发现硬盘分区多了个B盘,打开后看到了所有assembly下的DLL.3. 当这个虚拟的B分区不再需要,于是执行以下命令将其删除: Subst b: /d .4. 注册GAC: DOS下运行GACUTIL/I + dll path. 阅读全文
posted @ 2013-01-14 17:21 nchxmoon 阅读(253) 评论(0) 推荐(0) 编辑