06-01-2005 11:00 AM
06-02-2005 12:50 PM
06-02-2005 02:45 PM
06-03-2005 01:02 PM
10-12-2016 02:41 AM
You can use the functions:
InetFTPCommand (ftp_handle, "NLST", 0, 0, FTPCallback);
static int CVICALLBACK FTPCallback(int ftpHandle, int replyCode)
{
char buffer[1024];
int error;
while (1)
{
/* read data from server */
error = InetFTPReceiveData(ftpHandle, buffer, sizeof(buffer) - 1);
/* if error occurred return the error */
if (error < 0)
return error;
/* stop reading if there is no more data */
if (error == 0)
break;
/* NUL-terminate the buffer and print the data */
buffer[error] = '\0';
printf(buffer);
}
return 0;
}