In my post <pipe console program output to clipboard>, I made a tiny tool -- cmd2cb for my own convenience. After several days improvement, cmd2cb v0.92 is avaiable now.
Basic feature:
Pipe the output of a console program to clipboard.
New features:
1. Unicode support, cmd2cb can be used in CJK locale. ( Most important one)
2. Add a parameter -h or -help for help page.
3. When failed copy contents to clipboard, it will redirect the output to console.
Download:
box.net: cmd2cb.zip
namipan.net: cmd2cb.zip (for Chinese)
Screen snapshots:
cmd2cb 0.92版发布了!!
基本功能:
通过管道符把控制台程序的输出重定向到剪贴板,以方便其他程序使用。
增加的功能有:
1. 支持Unicode,因此能支持中文,日文,韩文以及其他ANSI 的CodePage
2. 增加命令行参数-h, -help,显示帮助
3. 在把内容输出到剪贴板失败时,仍旧输出到控制台
截图:
看上面英文版介绍
下载:
box.net: cmd2cb.zip
纳米盘: cmd2cb.zip
2009年3月20日星期五
cmd2cb.exe v0.92 is published
发帖者 凌浩 时间: 3/20/2009 02:06:00 下午 2 评论
标签: Utility
100篇blog纪念
我很惭愧,很不好意思,很小声的宣布:“本人终于写了100篇blog啦!”。
发帖者 凌浩 时间: 3/20/2009 11:17:00 上午 0 评论
标签: 杂七杂八
2009年3月16日星期一
Lnk2001: unresolved external symbol _com_util::ConvertBSTRToString
Today my colleague encountered a strange Lnk2001 error while using VS2003.net to build a project.
Here is the error snippet:
error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(unsigned short *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function "public: char const * __thiscall _bstr_t::Data_t::GetString(void)const " (?GetString@Data_t@_bstr_t@@QBEPBDXZ)
I checked if the correct lib (comsuppw.lib) is included. But he already did.
The same code can pass build in VC2005. But in VC2003, it can’t. That’s interesting.
One possibility is the environment of VC2003 differs from VC2005. By making a rough search, I found they are almost same. After I googled this bug, a post inspires me. I forget to check the method’s return type and argument type.
Let take a look at the same errors in VC2005:
Error 6 error LNK2001: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) XLRCreatorDll.obj
Compare the error msg in VC2005 and VC2003, we can see the return type and argument type is different:
char * __stdcall _com_util::ConvertBSTRToString(wchar_t *) ----VC2005
What does this mean?
Yes, the wchar_t in VC2003 project is treated as unsigned short instead of wchar_t itself. We know in some old OS implementation, wchar_t is only typedef of unsigned short. But in new release, wchat_t is definitely a native data type to support Unicode.
Then we know, in VC2003, the compiler still treats wchar_t as unsigned short rather than a native data type. But the prototype in comsuppw.lib, it requires wchar_t.
Thus comes the very simple solution: add /Zc:wchar_t to command line of compiler.
After adding this option, the annoying Lnk2001 disappears.
发帖者 凌浩 时间: 3/16/2009 06:13:00 下午 65 评论
2009年3月7日星期六
养目荠菜粥
荠菜,又名护生草、鸡心菜、净肠草,在路边或野地里随处可见。
荠菜不仅是营养丰富的美味食品,而且还能治疗多种疾病,民间不仅有“阳春三月三,荠菜当灵丹”的谚语,还流传着“春食荠菜赛仙丹”的说法。可见荠菜不仅是佳肴一碟,更是灵药一方。在中药里,荠菜的药用价值非常广泛,被誉为“菜中甘草”。祖国医学认为:荠菜味甘、性凉,归肝、脾、肾经,有和脾、利水、止血、明目等效用。
我这里推荐一道简单易学又清淡好吃的荠菜粥:
做法:荠菜(量自己控制),梗米50克,武火烧开,文火煮熟。
吃法:空腹食用,连续一个星期效果比较好。
推荐对象:每天对着显示器工作,感到自己眼睛不舒服的上班族。荠菜粥对目赤目暗,视网膜出血等症有比较好的治疗效果。其实我眼睛不舒服已经几个月了,最近连续吃荠菜粥,荠菜饭,炒荠菜,大量荠菜投下去,终于有点效果了。
另外喜欢精致的朋友可以用珍珠米。煮粥的米要预先腌:约半碗米淘洗干净后,要用2汤匙的油、1个半茶匙的盐和少许水(2茶匙)拌匀,腌至少半小时。这样煮出来的粥非常软,入口即化。煮的时候放一个轻的小调羹在锅底与粥同煮,水沸腾过程中,小调羹也被带动,可以防止粥煮粘底。
发帖者 凌浩 时间: 3/07/2009 12:07:00 上午 0 评论
标签: Life
2009年3月1日星期日
Share a very interesting physics game
the game "Crayon Physics" reveals the fun of physics to you and bring you back to your childhood drawing with crayons.
you may get it from http://www.crayonphysics.com/
发帖者 凌浩 时间: 3/01/2009 10:21:00 上午 1 评论
标签: 游戏