.....接收服务器发来的文件然后写入程序最后关闭句柄 不知道为什么我跟着OD跑 文件可以写完但是。。每次程序都会跑飞
;这里接收文件!
invoke GetCurrentDirectory,260,offset currd
invoke lstrcat,offset currd,offset filename
invoke CreateFile,addr currd,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL
mov hfilehandle,eax
invoke WriteFile, hfilehandle, offset recvbuff,sizeof recvbuff,offset oldwritebytes,NULL;首先要把读取出的字节数目取出然后写入!
mov eax,dword ptr [writebytes]
mov ebx,dword ptr [oldwritebytes]
add eax,ebx
mov dword ptr [writebytes],eax;写入字节数目已经记下了
writefiletele:
invoke RtlZeroMemory,offset oldwritebytes,sizeof oldwritebytes
invoke RtlZeroMemory,offset recvbuff,sizeof recvbuff
invoke m_recv,hSock,offset recvbuff,sizeof recvbuff,0
invoke SetFilePointer, hfilehandle,NULL,NULL,FILE_END
invoke WriteFile,hfilehandle, offset recvbuff,sizeof recvbuff,offset oldwritebytes,NULL;首先要把读取出的字节数目取出然后写入!
mov eax,dword ptr [writebytes]
mov ebx,dword ptr [oldwritebytes]
add eax,ebx
mov dword ptr [writebytes],eax;写入字节数目已经记下了
cmp eax,dword ptr [dFileSize]
jne writefiletele
invoke RtlZeroMemory,offset recvbuff,sizeof recvbuff
invoke CloseHandle, hfilehandle
mov dword ptr [writebytes],0
mov dword ptr [dFileSize],0
这上面的是相关代码。。。大大们。。。。。求助啊
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课