|
[求助]求一个关于复制操作的代码
lea esi,@szPath ;取"路径"的缓冲区首地址 mov cl,'\' xor eax,eax .if byte ptr [esi+eax-1]!=cl ;如果"路径"的缓冲区首地址+长度的末尾一个字符不是"\" mov word ptr [esi+eax],cx ;赋值"\" .endif =========== 是ecx清0,eax不能清零. ecx清零是因为放到esi+eax里面的是一个字,这个路径字符串必须要以0字节结束, eax清零那就完全错误了,eax中保存的是长度. =============== |
|
[求助]求一个关于复制操作的代码
不是吧 呵呵 我只是用od调试了两层 没敢运行 你自己试试改改 刚才又调试了一下 发现ecx没有清零的原因 在 lea esi,@szPath mov cl,'\' .if byte ptr [esi+eax-1]!=cl 前面加上 xor ecx,ecx 就可以了 |
|
[求助]求一个关于复制操作的代码
在你的代码框架的基础上,把不必要的内容删掉 .386 .model flat, stdcall option casemap :none include windows.inc include user32.inc includelib user32.lib include kernel32.inc includelib kernel32.lib .data? lpBuffer dd ? lpDir dd 128 dup (?) lpDirBuffer dd 128 dup (?) lpFileName dd 128 dup (?) .const lpStr db 'test',0 lpXie db '\',0 szYear db '%s', 0 lpFile1 db 'FormatText.exe',0 szFile db '*.*',0 szD db 'D:\',0 .code _FindFile proc _lpszPath LOCAL @stFindFile:WIN32_FIND_DATA LOCAL @szPath[MAX_PATH]:byte LOCAL @szSearch[MAX_PATH]:BYTE LOCAL @szCopyFile[MAX_PATH]:BYTE LOCAL @szFindPath[MAX_PATH]:BYTE LOCAL @szCopyPath[MAX_PATH]:BYTE LOCAL @hFindFile LOCAL @szFindFile[MAX_PATH]:BYTE pushad invoke lstrcpy,addr @szPath,_lpszPath invoke lstrlen,addr @szPath lea esi,@szPath xor ecx,ecx mov cl,'\' .if byte ptr [esi+eax-1]!=cl mov word ptr [esi+eax],cx .endif invoke lstrcpy,addr @szSearch,addr @szPath invoke lstrcat,addr @szSearch,addr szFile invoke lstrcpy,addr @szCopyPath,addr @szPath lea eax,@szCopyPath mov byte ptr [eax],'E' invoke FindFirstFile,addr @szSearch,addr @stFindFile .if eax!=INVALID_HANDLE_VALUE mov @hFindFile,eax .repeat invoke lstrcpy,addr @szFindFile,addr @szPath invoke lstrcat,addr @szFindFile,addr @stFindFile.cFileName invoke lstrcpy,addr @szCopyFile,addr @szCopyPath invoke lstrcat,addr @szCopyFile,addr @stFindFile.cFileName .if @stFindFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY .if @stFindFile.cFileName!='.' invoke CreateDirectory,addr @szCopyFile,NULL invoke _FindFile,addr @szFindFile .endif .else invoke CopyFile,addr @szFindFile,addr @szCopyFile,TRUE .endif invoke FindNextFile,@hFindFile,addr @stFindFile .until eax==FALSE invoke FindClose,@hFindFile .endif popad ret _FindFile endp start: invoke _FindFile,addr szD invoke CopyFile,addr lpFileName,addr lpDirBuffer,FALSE end start |
|
[求助]想学破解..很迷茫......
老大组织成长的故事征文,就是为我们指点迷津. |
|
[求助]求一个关于复制操作的代码
invoke CopyFile,addr lpFileName,addr lpDirBuffer,FALSE |
|
[求助]菜鸟提问,希望高手能够帮忙解答,关于写文件返回字节数的问题
.386 .model flat,stdcall option casemap:none include windows.inc include user32.inc includelib user32.lib include kernel32.inc includelib kernel32.lib .data? hFile dd ? szBuffer db 126 dup(?) dwTemp dd ? .const lpFile db '1.txt',0 lpStr db 'hahaha000000000000',0 lpcount db '输入了: %lu 个字符',0 .code start: invoke CreateFile,addr lpFile,GENERIC_WRITE,FILE_SHARE_READ,0,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,0 mov hFile,eax invoke WriteFile,hFile,addr lpStr,sizeof lpStr,addr dwTemp,NULL mov eax,dwTemp invoke wsprintf,addr szBuffer,addr lpcount,eax invoke MessageBox,NULL,addr szBuffer,addr lpFile,MB_OK end start |
|
[求助]菜鸟提问,希望高手能够帮忙解答,关于写文件返回字节数的问题
invoke wsprintf,addr lpcount,addr lpBuffer,NULL 是这个用错了 int wsprintf( LPTSTR lpOut, // pointer to buffer for output LPCTSTR lpFmt, // pointer to format-control string ... // optional arguments ); |
|
[求助]菜鸟提问,希望高手能够帮忙解答,关于写文件返回字节数的问题
.386 .model flat,stdcall option casemap:none include windows.inc include user32.inc includelib user32.lib include kernel32.inc includelib kernel32.lib .data? hFile dd ? szBuffer db 126 dup(?) dwTemp dd ? .const lpFile db '1.txt',0 lpStr db 'hahaha000000000000',0 lpcount db '输入了: %lu 个字符',0 .code start: invoke CreateFile,addr lpFile,GENERIC_WRITE,FILE_SHARE_READ,0,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,0 mov hFile,eax invoke WriteFile,hFile,addr lpStr,sizeof lpStr,addr dwTemp,NULL mov eax,dwTemp invoke wsprintf,addr szBuffer,addr lpcount,eax invoke MessageBox,NULL,addr szBuffer,addr lpFile,MB_OK end start |
|
[调查]希望看雪论坛组建学习小组
该吃早饭了,老虎.你天天熬到这么"早",对身体可不好. |
|
[调查]希望看雪论坛组建学习小组
支持,愿意提供劳动力,包括:端茶送水,打饭,上网扒拉扒拉找东西. |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值