用C++ Builderw做Ftp服务器程序
#include //Required for atoi()#include "..\winsock.h" //Winsock header filek;e4Gud;y:g
5B5C$J(F]l$^jz7S`
#define PROG_NAME "Quick FTP Version 1":G H K;\Gp3m}
#define HOST_NAME "NIC.DDN.MIL " // FTP server host
#define PASSWORD "PASS guest\r\n " // Password for FTP server host W!QK:Fz9f.S7EL@4q
#define WINSOCK_VERSION 0x0101 // Program requires Winsock version 1.1 5G&d$Aq"Y
#define DEFAULT_PROTOCOL 0 // No protocol specified, use default
#define NO_FLAGS 0 // No special flags specified jtnF S"W}5u{`
EO&vGw$Nv/cUl
char szCommandBuffer[100]; // Buffer for FTP commands +\f{d9b1K|'~
LPSTR lpszFunctionName; // Pointer for function names
0I:@,|$C5DSG6]w
UINT GetReplyCode(LPSTR lpszServerReply)
{
UINT nCode; // Reply code as a number dJaIS"n3w b
char c; // Temporary storage
// lpszFunctionName = "GetReplyCode "; 1~c+Q2a d
c = *(lpszServerReply+3); // Save the character tf!r8YSJ
*(lpszServerReply+3) = '\0'; // Terminate the code