Discussion:
Getting response to a command sent with WinInets.dll's FtpCommand()
(too old to reply)
SuperBK
2007-12-04 03:29:37 UTC
Permalink
I thought I posted this earlier, but I don't see it, so here goes
again.

If I send a command like "SIZE filename" with the FtpCommand()
function in Wininet.dll, how do I get the response back? In this case
the command comes back on the same socket as its sent on. The response
should be "213 size". I found the example where FtpCommand returns
data and you can get the data by calling InternetReadFile with the
handle.

Brian
Volodymyr Shcherbyna
2007-12-04 07:27:46 UTC
Permalink
As it seems for me you answered your question. Once you called FtpCommand,
you will need to call InternetReadFile(Ex) to obtain results.
--
Volodymyr
Post by SuperBK
I thought I posted this earlier, but I don't see it, so here goes
again.
If I send a command like "SIZE filename" with the FtpCommand()
function in Wininet.dll, how do I get the response back? In this case
the command comes back on the same socket as its sent on. The response
should be "213 size". I found the example where FtpCommand returns
data and you can get the data by calling InternetReadFile with the
handle.
Brian
SuperBK
2007-12-04 19:55:17 UTC
Permalink
No - what I meant is that I know how to read the response if it comes
back on the data socket. What I don't see is a way to read the
response that comes back on the control socket. Commands like LIST
and RETR come back on a different port, I want the response that comes
back on port 21

Brian

Loading...