1.TPoint type defines a pixel location onscreen.UnitWindowsstruct TPoint{
TPoint() {}
TPoint(int _x, int _y) : x(_x), y(_y) {}
TPoint(POINT& pt)
{
x = pt.x;
y = pt.y;
}
operator POINT() const
{
POINT pt;
pt.x = x;
pt.y = y;
return pt;
}
int x;
int y;};DescriptionThe TPoint type defines a pixel location onscreen, with the origin in the top left corner. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate.
TPoint() {}
TPoint(int _x, int _y) : x(_x), y(_y) {}
TPoint(POINT& pt)
{
x = pt.x;
y = pt.y;
}
operator POINT() const
{
POINT pt;
pt.x = x;
pt.y = y;
return pt;
}
int x;
int y;};DescriptionThe TPoint type defines a pixel location onscreen, with the origin in the top left corner. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate.
2、你在客户端发请求,SERVER端响应该请求,并生成相应的SOCK包返回给CLIENT
从客户端上浏览服务器的目录这种方式是不允许的,因为不安全。不过,如果通过FTP协议进行连接,可以取到服务器端的目录。
数据结构:
type TPoint = record
X: Longint;
Y: Longint;
end;
2、
1)、传输文件有多种方法,如建立连接后可用Socket.SendBuf发送数据,
用Socket.ReceiveBuf接受数据,也可用Socket.ReceiveText和socket.SendText
实现接受和发送;
2)、查看server端目录很简单,我过去做过:server端可通过控件ListBox1.Items.SaveToFile将目录信息保存到文件中,然后传送到
client端,client端再冲文件中读出即可。加分后还有更详细说明