Levon Chen 的脚步

生活在于拥抱改变。

2010年9月1日

C# 对某一部分代码执行时间进行检测

摘要: sealed class CommandTimer : IDisposable{Stopwatch commandStopwatch = new Stopwatch();internal CommandTimer(string command){commandStopwatch.Start();}public void Dispose(){commandStopwatch.Stop();Conso... 阅读全文

posted @ 2010-09-01 13:46 Levon Chen 阅读(293) 评论(0) 推荐(0) 编辑

2010年2月10日

Direct3D 9.0 SDK

摘要: http://www.gesoftfactory.com/developer/ 阅读全文

posted @ 2010-02-10 12:46 Levon Chen 阅读(157) 评论(0) 推荐(0) 编辑

2009年11月11日

PostThreadMessage 传递大数据指针问题

摘要: 在用PostThreadMessage传递大的数据指针时,如果把指针数据放在LPARAM里,该消息发送将会失败。只能放在WPARAM里。 阅读全文

posted @ 2009-11-11 11:16 Levon Chen 阅读(350) 评论(0) 推荐(0) 编辑

2009年11月5日

应用程序和COM库不在同一个目录下,但是COM库依赖于另一个C#的库。

摘要: #using <mscorlib.dll>#using <System.dll>#using <System.Xml.dll>ref class AssemblyResolveProxy{public:AssemblyResolveProxy() {System::AppDomain^ currentDomain = System::AppDomain::Cur... 阅读全文

posted @ 2009-11-05 16:25 Levon Chen 阅读(251) 评论(0) 推荐(0) 编辑

2009年11月4日

停止烦人的Automatic Updates Dialog。

摘要: Windows的自动更新提示对话框总是烦人的出现。运行以下的命令试试看。sc stop wuauserv 阅读全文

posted @ 2009-11-04 12:56 Levon Chen 阅读(193) 评论(0) 推荐(0) 编辑

SafeArray 的使用

摘要: 1. voidCTestDlg::OnButton1()2. {3. //TODO:Addyourcontrolnotificationhandlercodehere 4. USES_CONVERSION;//想用T2OLE就必须加上这一句 5. 6. CoInitialize(NULL);7. 8. ITestArrayPtrptr;9. ptr.CreateInstance(__uuidof(... 阅读全文

posted @ 2009-11-04 08:57 Levon Chen 阅读(323) 评论(0) 推荐(0) 编辑

字符串转化2

摘要: 转贴自: http://hi.baidu.com/greatren518/blog/item/ae8ec0113234b774ca80c4ca.html本主题演示如何将各种 C++ 字符串类型转换为其他字符串。可以转换的字符串类型包括 char *、wchar_t*、_bstr_t、CComBSTR、CString、basic_string 和 System.String。在所有情况下,在将字符串... 阅读全文

posted @ 2009-11-04 08:55 Levon Chen 阅读(205) 评论(0) 推荐(0) 编辑

导航