如何在treeview里面显示对方的磁盘和文件?(300分)

  • 主题发起人 主题发起人 Carem
  • 开始时间 开始时间
C

Carem

Unregistered / Unconfirmed
GUEST, unregistred user!
我正在为单位写一个监控软件。现在就是差这部分了。要求就是能够好像冰河一样,在treeview里面对客户端的磁盘和文件进行浏览和下载,但是我从来没做过,甚至连一个方向都没有!我参照过某个东西的源代码,但是他没有任何注释。请问有谁可以帮帮忙啊!??<br><br>以下是我看的那东西的关于文件操作的源代码!(是server端的)<br><br>&nbsp;var gotstr:string;<br>&nbsp; &nbsp; &nbsp; &nbsp;i, PX : integer;<br>&nbsp; &nbsp; &nbsp; &nbsp;TM : Cardinal;<br>&nbsp; &nbsp; &nbsp; &nbsp;RG : TRegistry;<br>&nbsp; &nbsp; &nbsp; &nbsp;TPC : PChar;<br>&nbsp; &nbsp; &nbsp; &nbsp;TMR, DM : string;<br>&nbsp; &nbsp; &nbsp; &nbsp;STD : TSearchRec;<br>&nbsp; &nbsp; &nbsp; &nbsp;FL : FILE; &nbsp; <br><br><br>// Disk list transmitting<br>&nbsp; &nbsp; &nbsp; &nbsp;if gotstr='getbaselist' then<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GetMem (TPC, 100);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PX:=GetLogicalDriveStrings (100, TPC);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DM:='';<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for i:=-1 to PX do<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (TPC+i)[1]&lt;&gt;#0 then DM:=DM+(TPC+i)[1];<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FreeMem (TPC);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TMR:='';<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Socket.SendText ('{TDSS}');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for i:=1 to Length (DM) do<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TMR:=TMR+DM;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (i mod 3)=0 then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GetMem (TPC, 4);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;StrPCopy (TPC, TMR);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PX:=GetDriveType (TPC);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FreeMem (TPC);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TM:=0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if PX=DRIVE_CDROM then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TMR:='C_'+TMR+WrapStr;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TM:=10;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if PX=DRIVE_FIXED then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TMR:='H_'+TMR+WrapStr;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TM:=10;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if TM&gt;0 then Socket.SendText (TMR);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TMR:='';<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Socket.SendText ('{FFDT}');<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; // 襄疱溧鬣 耧桉赅 羿殡钼 ?镟镪?<br>&nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp;if copy (gotstr, 1, 7)='diskget' then<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Socket.SendText ('{LFTM}'+WrapStr);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FindFirst (extract (gotstr, 8, Length(gotstr))+'*.*', faAnyFile, STD);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ((STD.Attr and faDirectory)&gt;0) and (STD.Name&lt;&gt;'.') then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Socket.SendText (TransName(STD)+WrapStr);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;repeat<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PX:=FindNext (STD);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (PX=0) and ((STD.Attr and faDirectory)&gt;0) and (STD.Name&lt;&gt;'..') then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Socket.SendText (TransName(STD)+WrapStr);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;until PX&lt;&gt;0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FindClose (STD);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FindFirst (extract (gotstr, 8, Length(gotstr))+'*.*',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;faArchive+faReadOnly+<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;faHidden+faSysFile, STD);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if STD.Attr&lt;&gt;faDirectory then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Socket.SendText (TransName(STD)+GetFSizeStr (STD));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;repeat<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PX:=FindNext (STD);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (PX=0) and (STD.Attr&lt;&gt;faDirectory) then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Socket.SendText (TransName(STD)+GetFSizeStr (STD));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;until PX&lt;&gt;0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FindClose (STD);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Socket.SendText ('{RETL}');<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>
 
http://yousoft.hi.com.cn/down_view.asp?id=58<br>东方神钥远程控制Delphi源码<br>&nbsp; 软件功能概述(附全部源代码):<br>&nbsp; &nbsp; 该软件主要用于远程监控,具体功能包括: <br>&nbsp; &nbsp; 1.自动跟踪目标机屏幕变化;<br>&nbsp; &nbsp; 2.鼠标和键盘输入的完全模拟;<br>&nbsp; &nbsp; 3.记录各种口令信息:包括开机口令、屏保口令、各种共享资源口令及绝<br>&nbsp; &nbsp; &nbsp; &nbsp;大多数在对话框中出现过的口令信息,同时提供击键记录功能;<br>&nbsp; &nbsp; 4.获取系统信息:包括注册公司、当前用户、系统路径、当前显示分辨率、<br>&nbsp; &nbsp; &nbsp; &nbsp;物理及逻辑磁盘信息等多项系统数据;<br>&nbsp; &nbsp; 5.限制系统功能:包括远程关机、远程重启计算机、锁定鼠标、锁定注册<br>&nbsp; &nbsp; &nbsp; &nbsp;表、禁止自动拨号等多项功能限制;<br>&nbsp; &nbsp; 6.远程文件操作:<br>&nbsp; &nbsp; 7.注册表操作:包括对主键的浏览、增删、复制、重命名和对键值的读写<br>&nbsp; &nbsp; &nbsp; &nbsp;等所有注册表操作功能;<br>&nbsp; &nbsp; 8.发送信息:以四种图标及六种提示按钮向目标机发送简短信息;<br>&nbsp; &nbsp; 9.通讯:以聊天室形式同被监控端进行交谈。 <br>
 
类似FTP?
 
to:<br>app2001<br>服务器调整,停机时间为2003年9月26日,软件频道将暂停服务,预计2003年10月10日后恢复。
 
http://www.2ccc.com/downloads/general/internet_lan/netkey.rar<br>这里我试过了,可以下载,不过要先注册才行,你试试看吧
 
不好意思,里面的代码都没有注释,可不可以只是贴出我需要的?谢谢!
 
C兄:我帮你注释了,再你的email里面!
 
接受答案了.
 
后退
顶部