C
caoliu
Unregistered / Unconfirmed
GUEST, unregistred user!
一个Server端,一个Client端,之间的连结通讯已解决;<br>但是通过Client端读Server端host的磁盘空间,只能读对C:/的空间其它的盘读的不对?<br>把Client端和Server端放在一台host上结果一样;<br>我在Server端的.ServerSocket1ClientRead写的代码如下:<br>procedure TForm1.ServerSocket1ClientRead(Sender: TObject;<br> Socket: TCustomWinSocket);<br> var<br> Receive,send :String;<br> drivers :boolean;<br> sec, byte1, space1,space2:longword;<br>begin<br> Receive :=socket.ReceiveText;<br> drivers:= GetDiskFreeSpace(pchar(Receive), sec, byte1,space1,space2);<br> if drivers = true then<br> space2 :=space2 * sec * byte1<br> else<br> space2 := 0;<br> send := Formatfloat('###,##0',space2);<br> socket.SendText(send);<br>end;<br><br>end.<br>