一个测试c++链接 sql server 数据库的例子// 数据库说明// 数据库用户为 sa , 密码为 空// 数据库为 MyDB// 表为 UserInfo// 表字段为 Name 、 PassWd 、ID// TestSQL.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_ Read More
posted @ 2014-02-10 15:34 私念之泪 Views(644) Comments(0) Diggs(0) Edit
一同事写的测试代码执行时间的帮助类,// TimeHlper.h#pragma once#ifndef NL#define NL _T("\n")#endif#define DEBUG_YGS#define IDPTRACE_VAL(fmt, val) TRACE(NL _T(__FUNCTION__) _T(#val) fmt, val) // 输出变量#define IDPTRACE_INT(val) IDPTRACE_VAL(_T("%d"), val) // 输出INT/////////////////////////////////////// Read More
posted @ 2014-02-10 11:49 私念之泪 Views(208) Comments(0) Diggs(0) Edit
调用CWnd::GetDC函数跟CWnd::ReleaseDC函数的代码运行时,会出现 4 个字节的内存泄漏。Microsoft 已经确认这是在本文开头部分列出的 Microsoft 产品中的缺陷。若要避免此问题,请使用GetDC方法和ReleaseDC方法的CWnd类版本。使用GetDC函数和ReleaseDC函数。http://support.microsoft.com/kb/819635/zh-cn再现现象的步骤中的方法是从CWnd派生的类的一部分中,插入下面的代码在您的应用程序:CDC *pDC; RECT rect; GetClientRect (&rect); f... Read More
posted @ 2014-02-10 11:32 私念之泪 Views(535) Comments(0) Diggs(0) Edit