|
|
|
关于写反汇编器的一些废话
写完后自己再看了一次,感觉都是废话 |
|
[原创]RR(ResourceRebuilder) Source
建议将 _tmain() 里面的两处调用: writeDataToFile(argv[nArgIndex+1],lpData,dwSize); 改成: if (!writeDataToFile(argv[nArgIndex+1],lpData,dwSize)) THROW_USER_ERROR("Write data to file error!"); 否则将来如果有人为它写一个shell的话,可能无法得到console程序的正确的返回值。 |
|
[Carvingdbg] 开发目标,角色分工
最初由 goldenegg 发布 我写的函数一般也都是有返回值的,不过我的返回值一般只有1和0两种情况,表示成功和失败。如果函数需要返回参数,那么就用指针参数来返回。例如: int foo(int *ReturnValue) { *ReturnValue = 100; //return 0; // fail return 1; // success } BTW:我很少用MFC写程序,因为写界面的活不落在我头上,呵呵。 |
|
[Carvingdbg] 开发目标,角色分工
最初由 riijj 发布 明白了,不过建议错误检查机制还是在编写时候就加上,否则工程大了之后很难再通过review的方式来解决的。另外还建议加上日志功能,这个日志是为了方便调试用的,用来记录程序运行时的状态和信息。这些规划一定要在工程刚刚开始时就进行,千万别等到摊子铺大了。。。 |
|
[Carvingdbg] 开发目标,角色分工
明显是没做过工程…… 提点改进建议: 1、函数的返回值应该有明确的意义,如果没必要的话,就不要有返回值。而且返回值的类型要统一,我看到有些函数的返回值是以0来表示成功的,但是有些又似乎是以1来表示成功的…… 2、我很怀疑这些代码能否健壮地运行起来而不出错,例如: fp = fopen( szName, "rb" ); fseek( fp, 0, SEEK_END ); ln = ftell( fp ); rewind( fp ); // Get the size lpBuffer = malloc( ln ); fread( lpBuffer, ln, 1, fp ); // Allocate memory for the file fclose( fp ); 这里至少有2个隐藏的bug,而且这种类型的bug遍布整个工程。程序中还有一些会导致内存泄漏的bug。 加油吧! |
|
[Carvingdbg] 开发目标,角色分工
搞明白了,应该是这样下载: cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/carvingdbg co -P carvingdbg 代码下回来了,看了一下,估计riijj以前没做过开源项目吧,提一些建议: 1、应该新建一个src目录,然后把所有的代码都放到这个目录下。 2、新建一个doc目录,放入开发文档。 3、COPYING、AUTHORS这些放在根目录下。 4、不是所有的文件都要放上来的,.dsw,.ncb,.opt这些就不用放。 5、条件允许的话,做几个Makefile,或是把不同的工程设置文件集中到一个目录中。 |
|
[Carvingdbg] 开发目标,角色分工
D:\>cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/carvingdbg login Logging in to :pserver:anonymous@cvs.sourceforge.net:2401/cvsroot/carvingdbg CVS password: D:\> 这是我的登陆过程,我用anonymous登陆的时候,要求输入密码,然后我就按照sf的说明直接按回车,结果就直接退出到命令行了…… |
|
[Carvingdbg] 开发目标,角色分工
anonymous帐号无法登陆CVS吗? |
|
|
|
我想统计一下平均年龄,保密么?Fly老大先说
#include <stdio.h> int main() { int n = 78; printf("我的出生年份:%d年\n", ++++++n+n---++n+n---n+n++-n); } 请用VC6.0编译,否则不保证结果的正确性。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值