
C/C++
文章平均质量分 74
jfyy
这个作者很懒,什么都没留下…
展开
-
VS2022的性能调试工具:Perfermance Profiler
VS2022的性能调试工具 Perfermance Profiler原创 2023-03-16 15:04:25 · 2095 阅读 · 0 评论 -
Test Automation Frame(TAF)
参考:https://docs.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-overview(没怎么看)https://www.codeproject.com/Articles/141842/Automate-your-UI-using-Microsoft-Automation-Framew(里面的...原创 2018-06-15 11:09:04 · 786 阅读 · 0 评论 -
C# 调用C++
关于C#调用C++ dll, 以前写的博客找不到了,只能重新再写。1)可以简单的参考:Calling an unmanaged dll from .NET (C#)https://blogs.msdn.microsoft.com/jonathanswift/2006/10/02/calling-an-unmanaged-dll-from-net-c/注意点:extern "C" 必须加,...原创 2018-04-12 13:57:15 · 177 阅读 · 0 评论 -
interior_ptr & pin_ptr
interior_ptr :msdn: 点击打开链接托管类型不能直接转换成非托管类型,只能使用interior_ptr,声明个指针,里面存放托管类型变量的引用,然后才能对其使用。例如有一个类ref class MyClass {public: int data;};下面的代码,编译时出错 MyClass ^ h_MyClass = gcnew My原创 2013-01-16 17:50:31 · 5427 阅读 · 0 评论 -
C语言宏技巧
近日看到gtest的文章=》 http://www.cnblogs.com/coderzh/archive/2009/04/12/1434155.html 对其宏使用的技巧感觉非常巧妙,使用宏充当了一个代码生成器的作用!!!用一句宏生成一个类(包括类的定义和实现)参考: http://c.chinaitlab.com/basic/874223.html 对宏理解后,进行总结。原创 2012-05-11 17:43:46 · 637 阅读 · 0 评论 -
static_cast, reinterpret_cast, const_cast和dynamic_cast
1, static_cast和reinterpret_cast (reinterpret_cast更像是C以前的强制转换)C++中的static_cast一般执行非多态的转换;而reinterpret_cast能将数据以二进制存在形式的重新解释,能够完成static_cast不能完成的转换。例如: int i, k; int* j = &k; i = (int)j;原创 2012-05-28 11:01:08 · 460 阅读 · 0 评论 -
在win32里实现COM
终于看到一篇关于在win32里实现COM的文章了,文章很长,写的很好。http://www.codeproject.com/Articles/13601/COM-in-plain-C#DLLhttp://www.codeproject.com/Articles/3365/Embed-an-HTML-control-in-your-own-window-using-pla1)原创 2012-03-09 17:20:41 · 747 阅读 · 0 评论 -
Windows打印
可以参照《传统的Windows打印程序设计》http://yadang418.blog.163.com/blog/static/26843656200966101621459/一、重要的API函数PrintDlg:呼叫PrintDlg函数打开一个标准的打印对话框。这个函数还为使用者提供了一个在打印之前选择打印机和指定打印属性的机会。然后,它将打印机设备内容句柄交给应原创 2011-12-15 18:59:33 · 1107 阅读 · 0 评论 -
Windwos XP风格,对话框有半透明,圆角效果
一、XP风格1)创建manifest文件,首先在RES目录下建一个文件,命名Master.manifest然后用记事本打开放入 <assemblyIdentity name="Microsoft.Windows.XXXX" processorArchitecture="x86" version="5.1.0.0" type="win32"/> Windows Shell转载 2011-12-15 17:44:30 · 1179 阅读 · 0 评论 -
论C++构造函数时的多态性
看下面的代码class A{public: int i; A() { i = getResult(); } int get() { return getResult(); } virtual int getResult() { return 1; }};class B : public A{public: virtual int getRes...原创 2011-09-22 17:55:02 · 1416 阅读 · 2 评论 -
记录下callstack信息
本人曾做过自动测试内存泄露的程序。记录内存泄露位置时用__FILE__, 和__LINE__来记录位置。但重要的callstack信息没有记录下来。无意中看到一篇文章http://blog.youkuaiyun.com/starlee/article/details/6618849原创 2011-09-08 10:34:59 · 1313 阅读 · 0 评论 -
程序在崩溃时记录出错的位置-Dump文件
Debug模式下,出异常时,很容易找到出错的位置和callstack信息。但发布以后,再出异常的时候,就必须用到DUMP文件了。本文主要是参考了http://blog.youkuaiyun.com/starlee/article/details/6630816 调用的APIB原创 2011-09-08 10:19:55 · 4487 阅读 · 0 评论