How to Change the Port Address in wininet.dll's InternetOpenA?

  • Thread starter Thread starter Adam Quark
  • Start date Start date
A

Adam Quark

Guest
Good afternoon, all -

I'm trying to write some code in an Excel macro to allow me to rename files on an SFTP site before downloading them.


I've managed to get a simple block written that works well against a test server, but it fails when I try to access the actual server I need.

I suspect that it's because this server uses Port 22, not the standard Port 21. But, I can't see how to change that Port address to what I need.


In InternetOpenA, I've tried setting dwAccessType to INTERNET_OPEN_TYPE_PROXY (3) and lpszProxy to ftp=ftp://Proxy1:22 (with my specifics replacing the placeholders). But, no good. InternetConnectA refuses to connect.

So, since this code worked with using the defaults, I figure I'm not modifying the Port properly.

Oh, an afterthought - would that this is an SFTP, not FTP, be an issue?

Thanx in advance for any assistance!

Continue reading...
 
Back
Top