<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[xjq2003的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/xjq2003</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; xjq2003]]></copyright><item><title><![CDATA[高质量C++编程之内存管理]]></title><link>https://blog.csdn.net/xjq2003/article/details/8431814</link><guid>https://blog.csdn.net/xjq2003/article/details/8431814</guid><author>xjq2003</author><pubDate>Tue, 25 Dec 2012 08:14:55 +0800</pubDate><description><![CDATA[常见的内存错误及其对策
    问题1： 内存分配未成功，却使用了它
    解决办法：在使用内存之前检查指针是否为NULL。如果指针p是函数的参数，那么在函数的入口处用assert(p!=NULL)进行检查。如果是用malloc或new来申请内存，应该用if(p==NULL)或if(p!=NULL)进行防错处理。
    问题2： 内存分配虽然成功，但是尚未初始化就引用它。
    问题]]></description><category></category></item><item><title><![CDATA[at91sam7x之看门狗定时器使用]]></title><link>https://blog.csdn.net/xjq2003/article/details/5950358</link><guid>https://blog.csdn.net/xjq2003/article/details/5950358</guid><author>xjq2003</author><pubDate>Tue, 19 Oct 2010 09:08:00 +0800</pubDate><description><![CDATA[ 
<br />at91sam7x之看门狗使用比较简单，但是刚开始设置WDT_MR确不成功.<br />函数如下：<br />//---初始化看门狗-----------------------<br />void Init_WDT(void)<br />{<br /> *AT91C_WDTC_WDMR = 0x3Eff2Eff; <br />}<br />//---复位  看门狗-----------------------<br />void ClearWDT(void)<br />{<br />  ]]></description><category></category></item><item><title><![CDATA[at91sam7x256之IIC(TWI)实验_PCF8563_AT24C02]]></title><link>https://blog.csdn.net/xjq2003/article/details/5704939</link><guid>https://blog.csdn.net/xjq2003/article/details/5704939</guid><author>xjq2003</author><pubDate>Wed, 30 Jun 2010 16:15:00 +0800</pubDate><description><![CDATA[I2C总线是由Philips公司开发的2线式串行总线，由于其简单、高效、互联成本小而被广泛地用于微控制器与外围设备的连接。AT91SAM7X256是Atmel公司于2005年推出的基于ARM7的工业级芯片，他以体积小、功耗低、连接方式广泛、处理资源丰富、控制灵活等特点受到嵌入式领域开发人员的重视。本文介绍AT91SAM7X256的I2C控制器TWI接口(two-wired
 interface)]]></description><category></category></item><item><title><![CDATA[at91sam7x256与ads1256/ads1255的SPI通讯]]></title><link>https://blog.csdn.net/xjq2003/article/details/5701458</link><guid>https://blog.csdn.net/xjq2003/article/details/5701458</guid><author>xjq2003</author><pubDate>Tue, 29 Jun 2010 12:03:00 +0800</pubDate><description><![CDATA[<br />at91sam7x256通过SPI0控制SPI接口的LCD,按照开发板的iar例程，移植到keil中很轻松的搞定了。<br />可是at91sam7x256与TI公司的ads1256/ads1255通讯搞了两周始终有这样那样的问题，<br />现在通讯基本上正常了，当然还有些细节问题需要解决。<br />//at91sam7x256的SPI0初始化<br />void Init_SPI0(void)<br />{<br /> GPIO_A->PIO_OER  |=MOSI0 |MISO0 |SC]]></description><category></category></item><item><title><![CDATA[at91sam7x256之SPI0与SPILCD]]></title><link>https://blog.csdn.net/xjq2003/article/details/5655267</link><guid>https://blog.csdn.net/xjq2003/article/details/5655267</guid><author>xjq2003</author><pubDate>Tue, 08 Jun 2010 12:01:00 +0800</pubDate><description><![CDATA[<br />又搞了半天，液晶模块显示功能搞定了。<br />LCD应该叫LCM，反正都是叫液晶模块，带字库的液晶12232E。<br />液晶与at91sam7x256连接是通过串口SPI连接的，这样节省了不少管脚，连线也少了。<br />基本上是开发板iar例子搬过来的，但是设置有些不同：<br />1，io初始化不同，因为iar例子里面都是开发板厂家自己写的程序，很乱，看不清楚。<br />　　　　我自己对spi端口进行了初始化，也用了lib_at91sam7x256.h里的库函数，两个都可以用。<br]]></description><category></category></item><item><title><![CDATA[at91sam7x256之串口uart0设置之二 ]]></title><link>https://blog.csdn.net/xjq2003/article/details/5655259</link><guid>https://blog.csdn.net/xjq2003/article/details/5655259</guid><author>xjq2003</author><pubDate>Tue, 08 Jun 2010 11:59:00 +0800</pubDate><description><![CDATA[<br />搞了两天，at91sam7x256之串口uart0终于搞定了，<br />一开始出现的问题是发送出来的数据不对，但是用串口调试助手给开发板发送数据，然后直接回送没有问题。<br />原因是串口波特率设置不对，我把晶振频率FOSC作为系统主时钟MCK用了，虽然检查半天控制寄存器US_CR和模式寄存器US_MR各个位的值设置都没有问题，也是不行的。<br />看了开发板例程中的board .h头文件,我才知道原来晶振频率FOSC作为系统主时钟MCK不同：<br />#define AT91B_MAI]]></description><category></category></item><item><title><![CDATA[at91sam7x256之gpio与串口 uart0]]></title><link>https://blog.csdn.net/xjq2003/article/details/5655254</link><guid>https://blog.csdn.net/xjq2003/article/details/5655254</guid><author>xjq2003</author><pubDate>Tue, 08 Jun 2010 11:58:00 +0800</pubDate><description><![CDATA[ 
<br />at91sam7x256的gpio输出很简单，只要设置一下<br />PIO_OER寄存器，输出或者清零的时候操作PIO_SODR或PIO_CODR寄存器就可以了。<br />可是gpio输入状态读取的时候直接读取PIO_PDSR是得不到管脚高低电平状态的，<br />必须设置PMC_PCER相应位将PIO 控制器时钟使能，<br />手册上写道【对I/O 线电平读取时需要将PIO 控制器时钟使能，否则PIO_PDSR 读到的是时钟禁用时的I/O<br />线电平。】<br />串口（UA]]></description><category></category></item><item><title><![CDATA[KEIL加jlink调试at91sam7x256之一]]></title><link>https://blog.csdn.net/xjq2003/article/details/5647640</link><guid>https://blog.csdn.net/xjq2003/article/details/5647640</guid><author>xjq2003</author><pubDate>Fri, 04 Jun 2010 15:15:00 +0800</pubDate><description><![CDATA[<br />按照keil for arm教程建个工程， 写主函数，操作GPIO,程序写好后编译没有问题，<br /> "at91sam7x.axf" - 0 Error(s), 0 Warning(s). <br />设置debug为JLINK， 程序下载到flash的时候，<br />提示 keil之out window窗口提示错误如下： No Algorithm found for: 00100000H - 001004E7H <br />很是郁闷，咋不行啊， <br />上百度google了一下搜索"]]></description><category></category></item><item><title><![CDATA[jpg文件压缩]]></title><link>https://blog.csdn.net/xjq2003/article/details/5494045</link><guid>https://blog.csdn.net/xjq2003/article/details/5494045</guid><author>xjq2003</author><pubDate>Fri, 16 Apr 2010 15:55:00 +0800</pubDate><description><![CDATA[#include  //这个一定要的  ... TJPEGImage *j=new TJPEGImage(); j->LoadFromFile("e://temp//aaa.jpg"); j->DIBNeeded(); j->CompressionQuality=2; //1..100 压缩率 高-->低 j->Compress(); j->SaveToFile("e://temp//aaa1.j]]></description><category></category></item><item><title><![CDATA[C++Builder非可视组件的消息处理技巧]]></title><link>https://blog.csdn.net/xjq2003/article/details/4417730</link><guid>https://blog.csdn.net/xjq2003/article/details/4417730</guid><author>xjq2003</author><pubDate>Thu, 06 Aug 2009 11:22:00 +0800</pubDate><description><![CDATA[一个非可视的组件必须对Windows操作系统或用户定义的消息作出响应。然而，由于一个非可视组件没有窗口，因此它也没有窗口句柄，自然它也不能接收到消息,为了解决这一问题,我们的思路是创建一个隐藏的窗口，使非可视组件能够接收到消息。　　为了给你的非可视组件创建一个隐藏的窗口，需要有以下：　　1．一个私有变量型(Private Variable)的HWnd来取得窗口句柄。　　2．一个用来捕捉窗口发送给组]]></description><category></category></item><item><title><![CDATA[第二次使用C++BUILDER开发SOCKET通讯程序，工作完成]]></title><link>https://blog.csdn.net/xjq2003/article/details/4248287</link><guid>https://blog.csdn.net/xjq2003/article/details/4248287</guid><author>xjq2003</author><pubDate>Sat, 06 Jun 2009 22:02:00 +0800</pubDate><description><![CDATA[我想通过网络向设备（led屏）iP:192.168.224.250 端口号：2929 发送数据，比如发送unsigned char buf[1024]; 中的数据， 请问是用BCB中的         TClientSocket *ClientSocket1;         TServerSocket *ServerSocket1;         TUdpSocket *UdpSocket1;]]></description><category></category></item><item><title><![CDATA[在CB中用socket api来写网络通讯程序]]></title><link>https://blog.csdn.net/xjq2003/article/details/4237079</link><guid>https://blog.csdn.net/xjq2003/article/details/4237079</guid><author>xjq2003</author><pubDate>Tue, 02 Jun 2009 20:23:00 +0800</pubDate><description><![CDATA[ 关键字：socket,api,网络通讯程序,TCP,UDP 作者：kingcaiyao    更新：2003-09-10    浏览：14250本文转自csdn，作者：kingcaiyao原标题：在C++ Builder中用socket api来写网络通讯程序（同时支持TCP和UDP协议）原文:  http://www.csdn.net/develop/read_arti]]></description><category></category></item><item><title><![CDATA[dbgrid用两种颜色间隔分行显示]]></title><link>https://blog.csdn.net/xjq2003/article/details/4093896</link><guid>https://blog.csdn.net/xjq2003/article/details/4093896</guid><author>xjq2003</author><pubDate>Mon, 20 Apr 2009 11:15:00 +0800</pubDate><description><![CDATA[Delphi代码如下： procedure   TForm1.DBGrid1DrawColumnCell(Sender:   TObject;   const   Rect:   TRect;         DataCol:   Integer;   Column:   TColumn;   State:   TGridDrawState);     begin         with  ]]></description><category></category></item><item><title><![CDATA[c++builder对数据库中BLOB字段读写]]></title><link>https://blog.csdn.net/xjq2003/article/details/3898634</link><guid>https://blog.csdn.net/xjq2003/article/details/3898634</guid><author>xjq2003</author><pubDate>Tue, 17 Feb 2009 08:38:00 +0800</pubDate><description><![CDATA[SQL Server2000 我用的image 类型 //存储 TBlobField *blob_pic=(TBlobField *)UserMod->TInsert->FieldByName("IMAGE");     try     {         blob_pic->LoadFromFile(app_path+"//temp//temp.jpg");     }     catch(..]]></description><category></category></item><item><title><![CDATA[Delphi中DHtmlEdit回车换两行的解决办法收藏]]></title><link>https://blog.csdn.net/xjq2003/article/details/3835503</link><guid>https://blog.csdn.net/xjq2003/article/details/3835503</guid><author>xjq2003</author><pubDate>Mon, 19 Jan 2009 09:04:00 +0800</pubDate><description><![CDATA[相信所有用到过DHtmlEdit  Ocx控件的朋友都遇到过这个问题,回车的时候,会产生标记,导致行间距过大,而 Shift+回车 就比较正常,原因是Shift+回车 产生的标记是 ;今天看到CSDN有朋友发问,顺手写个解决办法,当然办法不止一种,css也可以解决,这里顺着提问者的思路给出解决办法.  代码如下: view plaincopy to clipboardpri]]></description><category></category></item><item><title><![CDATA[C++ Builder中消息机制的研究与应用技巧]]></title><link>https://blog.csdn.net/xjq2003/article/details/3227302</link><guid>https://blog.csdn.net/xjq2003/article/details/3227302</guid><author>xjq2003</author><pubDate>Wed, 05 Nov 2008 16:06:00 +0800</pubDate><description><![CDATA[ 　　　　C++ Builder作为一种RAD方式的程序开发工具，提供了功能强大的集成开发环境。C++ Builder提供的VCL组件，封装了Windows的底层API和具体实现细节，也提供了对组件消息机制的良好封装。比如，可以对按钮控件（TButton）的单击、按下、拖动等事件消息设置相应的处理函数，并在对应的函数体中实现对该消息的处理与响应。虽然C++ Builder对VCL组件的消息]]></description><category></category></item><item><title><![CDATA[我在BCB中实现消息处理的简单代码--XJQ2003]]></title><link>https://blog.csdn.net/xjq2003/article/details/3226948</link><guid>https://blog.csdn.net/xjq2003/article/details/3226948</guid><author>xjq2003</author><pubDate>Wed, 05 Nov 2008 15:33:00 +0800</pubDate><description><![CDATA[ 一-//初始化 void  INITMessage(HWND pWnd,UINT uMsgID){    pWnd= Form1->Handle;    uMsgID=WM_FILEREADY;   pWnd=FindWindow("TForm1","Form1");//这个好象可以不要          if(pWnd==NULL)                  retur]]></description><category></category></item><item><title><![CDATA[C++ Builder中消息处理过程及应用]]></title><link>https://blog.csdn.net/xjq2003/article/details/3226855</link><guid>https://blog.csdn.net/xjq2003/article/details/3226855</guid><author>xjq2003</author><pubDate>Wed, 05 Nov 2008 15:23:00 +0800</pubDate><description><![CDATA[C++ Builder作为一种RAD方式的程序开发工具，其全新的可视化编程环境、面向组件的开发模式无疑会大大地提高编程效率。它对繁杂的Windows 消息及API作了较全面的封装，编程者在大多数情况下不需理会Windows消息的细节，只要将心思放在组件的事件处理函数上即可。  然而，毕竟Windows操作系统是一个以消息驱动的系统，运行其上的应用程序，自然无法脱离系统之外，因此掌握并运用消息处]]></description><category></category></item><item><title><![CDATA[CRC算法]]></title><link>https://blog.csdn.net/xjq2003/article/details/1929227</link><guid>https://blog.csdn.net/xjq2003/article/details/1929227</guid><author>xjq2003</author><pubDate>Tue, 11 Dec 2007 13:49:00 +0800</pubDate><description><![CDATA[//======CRC算法=============static unsigned short crctab[256]={0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,0x1231, 0]]></description><category></category></item><item><title><![CDATA[delphi中结束进程]]></title><link>https://blog.csdn.net/xjq2003/article/details/1701097</link><guid>https://blog.csdn.net/xjq2003/article/details/1701097</guid><author>xjq2003</author><pubDate>Sat, 21 Jul 2007 03:42:00 +0800</pubDate><description><![CDATA[Uses TLHelp32;procedure EndProcess(AFileName: string);constPROCESS_TERMINATE = $0001;varContinueLoop: BOOL;FSnapShotHandle: THandle;FProcessEntry32: TProcessEntry32;beginFSnapShotHandle := CreateToolh]]></description><category></category></item></channel></rss>