|
[求助]用汇编写的程序如何减少内存占用?
最初由 hyzhang 发布 smss.exe只加载了smss.exe和ntdll.dll两个模块,当然内存占用很少了. 只要有窗口,就会占用大量内存空间. 加载kernel32.dll和user32.dll一样会占用许多空间. 因为kernel32.dll和user32.dll是win32子系统层, 而ntdll.dll是NT中间层,在win32子系统层之下. |
|
|
|
[原创]在VC中播放mid音乐的最简单方法
最初由 prince 发布 原来那些数据需要手写-_-!汗~~~ 写个小程序来自动帮我们写吧! [COLOR=blue] #include<stdio.h> void main() { unsigned char c; unsigned int n=0; FILE *fin =fopen("data.bin","rb"); FILE *fout=fopen("data.h" ,"wb"); if(!fin||!fout) {printf("not found data.bin!\n");return;} fprintf(fout,"unsigned char *data[]={\r\n"); while(1) { c=fgetc(fin); if(feof(fin)) break; fprintf(fout,"0x%02X,",c); if(++n%16==0) fprintf(fout,"\r\n"); } fseek(fout,-1,SEEK_CUR); fprintf(fout,"\r\n};\r\n"); fclose(fout); fclose(fin); } 当然使用资源也是一个好办法,但比起直接使用数组缺点如下: 1.需要调用FineResource,SizeofResource,LoadResource,LockResource等函数,代码量多一些. 2.资源目录表和资源名称(如果使用字符串格式)需要一些额外的数据,且不能被加壳工具压缩. 3.使用资源就非常明显让别人轻易提取出该资源的数据. 4.便于某些无资源编译器或不方便编辑资源的编译器编译(如Dev C++). 还有另一个方法可以直接包含文件,而不是一堆十六进制数据. 但需要有nasm汇编器(把nasmw.exe放入VC编译程序目录中). 工程中添加文件mididata.asm,内容: section .data global _mididata _mididata incbin "midi.mid" ;包含文件的文件名,与此文件同目录 设置mididata.asm的编译属性: Custom Build/Commands: nasmw -f win32 -o $(OutDir)\$(InputName).obj $(InputPath) Custom Build/Outputs: $(OutDir)\$(InputName).obj 然后只需要在需要mididata的C++文件中加入下面一行即可: extern "C" unsigned char mididata[12345]; //大小需要手动输入 哪个方法更方便自己决定吧...... |
|
|
|
[讨论]用那个API可以搜索出本地机上所有存在的盘符
最初由 HSQ 发布 是的.大部分的免CD补丁程序都是从GetDriveType下手的. |
|
NsPack V3.3+V3.4+V3.5+V3.6 CracKed
破解版更新速度越来越快了:-) |
|
[求助]用汇编写的程序如何减少内存占用?
最初由 hyzhang 发布 VC中修改工程属性比较方便. 不过MS的工具应该差不多. 如果使用MASM32,link的时候注意一下它的某个参数. |
|
关于 nt 内核物件位置的问题
可以翻翻win2000的源码.不过可能更乱:-) |
|
[讨论]用那个API可以搜索出本地机上所有存在的盘符
使用下面的函数遍历所有的盘符: GetDriveType The GetDriveType function determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. UINT GetDriveType( LPCTSTR lpRootPathName // pointer to root path ); Parameters lpRootPathName Pointer to a null-terminated string that specifies the root directory of the disk to return information about. If lpRootPathName is NULL, the function uses the root of the current directory. Return Values The return value specifies the type of drive. It can be one of the following values: Value Meaning DRIVE_UNKNOWN The drive type cannot be determined. DRIVE_NO_ROOT_DIR The root directory does not exist. DRIVE_REMOVABLE The disk can be removed from the drive. DRIVE_FIXED The disk cannot be removed from the drive. DRIVE_REMOTE The drive is a remote (network) drive. DRIVE_CDROM The drive is a CD-ROM drive. DRIVE_RAMDISK The drive is a RAM disk. |
|
|
|
小弟急需一个给文件夹加密码的工具,望大侠快出现!
最初由 FlyingSnow 发布 winfile在Win9x中也是自带的. Win2000以上可以Icesword,也是"通杀". 因为它是使用文件系统级访问的,可惜对文件操作有限. |
|
小弟急需一个给文件夹加密码的工具,望大侠快出现!
最初由 herozyf 发布 第一次建立zyf..\这个目录, 可以使用cd zyf~1来进入,rd zyf~1来删除. 再建立zyf...\这个目录, 则可以使用cd zyf~2来进入,rd zyf~2来删除. 如果不知道短文件名,可以使用dir/x来获取. 这个在控制台可用,运行对话框中输入完整的短目录名可打开窗口访问. 象Icesword等工具访问就更方便了. 很有意思的目录名... |
|
D programming language by Digital Mars
感觉D语言吸取了许多语言的优秀特点,尤其是C. 针对底层添加了以前C语言稍有缺陷的一些特性,例如bit类型. 不过很怀疑是否真有发展,是否有商业上的支持. |
|
D programming language by Digital Mars
最初由 auser 发布 这个是D语言?好像是C语言的加强版. |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值