首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian >> Symbian开发 >> 正文
如何在vc里面显示symbian字符串
作者:windcao …    文章来源:newlc    更新时间:2007-6-4 9:34:27

How to display Symbian strings and descriptors in Visual C++ debugger

如何在vc里面显示symbian字符串

Currently, using Visual Studio is a little bit painful when you deal with descriptor since you cannot directly display their content (you have to use the memory window). Here is a little trick that will allow you to display clear content of Symbian descriptors.

目前使用vc时有点痛苦,那就时当你和描述符打交道的时候,不能够直接显示描述符的内容(你必须使用内存窗口来查看)。这里有一个小技巧可以让你清楚的看到描述符内容。

For this, you will have to take benefit of a feature of Microsoft Visual Studio called "Auto Expand". It allows the debugger to specify rules to display the content of custom data. This feature can be configured manually by editing the AutoExp.dat file which is located by default in C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin)

你必须了解一个vc的自动扩展方面的特性,它允许定义调试器显示特殊的用户定义的数据的内容。这个特性可以在C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin下面的autoexp.dat 里面配置。

Open this file in your favorite text editor, copy/paste the following text at the end of it:

用你喜欢的文本编辑器打开这个文件,将下面这段文本加到后面:

Re-start the environment, put a breakpoint or two, start the debugger, and here you are....

重启vc,设置一两个断点,按F5来调试一下吧,你会看到像下面这样的显示

desc-display.png

Isn't it nice ?

爽不爽?

;=======================================================
;
; Symbian Strings & Descriptors
;
;=======================================================
TDes16=<,t> length=<iLength> max=<iMaxLength>
TDesC16=<,t> length=<iLength>
TPtr=length=<iLength> max=<iMaxLength> ptr=<iPtr+2,su>
TPtr16=length=<iLength> max=<iMaxLength> ptr=<iPtr+2,su>
TPtrC=length=<iLength> ptr=<iPtr,su>
TPtrC16=length=<iLength> ptr=<iPtr,su>
TBuf<*>=length=<iLength> max=<iMaxLength> buf=<iBuf,su>
TBufC<*>=length=<iLength> buffer=<iBuf,su>
HBufC16=length=<iLength> buffer=<iBuf,su>
TLitC<*>=length=<iTypeLength> buf=<iBuf,su>

TDes8=<,t> length=<iLength> max=<iMaxLength>
TDesC8=<,t> length=<iLength>
TPtr8=length=<iLength> max=<iMaxLength> ptr=<iPtr,s>
TPtrC8=length=<iLength> ptr=<iPtr,s>
TBuf8<*>=length=<iLength> max=<iMaxLength> buffer=<iBuf,s>
TBufC8<*>=length=<iLength> buffer=<iBuf,s>
HBufC8=length=<iLength> buffer=<iBuf,su>
TLitC8<*>=length=<iTypeLength> buffer=<iBuf,s>

TFileName= <iBuf,su>
TFullName= <iBuf,su>
相关文章:
Symbian开发环境设置(Microsoft Visual Studio.Net 2003工具)已测试通过
如何在VC里面调试Symbian的程序
Symbian开发工具和开发包
Visual C++入门之路
C++编程新手错误语录 (一)
Nokia官方培训(Symbian 4300)笔记(六)--Descriptors
最难搞定的HelloWorld(编译)
用S60操作系统SDK开发NOKIA手机应用程序-范例HelloWorld分析
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号