raykos
2004-10-06 11:57:02 UTC
Hello group,
I'm using the 'FtpCommand' in synchronous mode and I'm able to get back a
data buffer when I send 'NLST'; but, since I'm synchronous is there any way
of knowing and reading when the '226 data channel closed' comes back, since
this response
is coming from the control channel? I can use 'InternetGetLastResponseInfo',
but when to use it, since I don't know when something is available?
FtpCommand(g_hConnection, TRUE, FTP_TRANSFER_TYPE_ASCII,
"NLST", 0, &g_hResponse);
::InternetGetLastResponseInfo(&temp_int,temp_str,&length);
InternetReadFile(g_hResponse,bDataBuffer,4096,&dwBytesRead);
while(dwBytesRead > 0)
{
bDataBuffer[dwBytesRead] = '\0';
InternetReadFile(g_hResponse,bDataBuffer,4096,&dwBytesRead);
}
::InternetGetLastResponseInfo(&temp_int,temp_str,&length);
Any help appreciated,
TIA,
Ray K.
I'm using the 'FtpCommand' in synchronous mode and I'm able to get back a
data buffer when I send 'NLST'; but, since I'm synchronous is there any way
of knowing and reading when the '226 data channel closed' comes back, since
this response
is coming from the control channel? I can use 'InternetGetLastResponseInfo',
but when to use it, since I don't know when something is available?
FtpCommand(g_hConnection, TRUE, FTP_TRANSFER_TYPE_ASCII,
"NLST", 0, &g_hResponse);
::InternetGetLastResponseInfo(&temp_int,temp_str,&length);
InternetReadFile(g_hResponse,bDataBuffer,4096,&dwBytesRead);
while(dwBytesRead > 0)
{
bDataBuffer[dwBytesRead] = '\0';
InternetReadFile(g_hResponse,bDataBuffer,4096,&dwBytesRead);
}
::InternetGetLastResponseInfo(&temp_int,temp_str,&length);
Any help appreciated,
TIA,
Ray K.