Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21103

Help with wininet FTP Upload

$
0
0
I'm using the code from http://www.ex-designz.net/apidetail.asp?api_id=50

The code works fine in an exe just to test. I put it on form load. The form loads and uploads a test.txt file to my localhost ftp.

However im needing to use the code in an active x dll. I have the same exact code that works in my test exe in my dll. It doesnt matter if I put it in sub main or if i put it in the frmNew modal form. When I compile and load the exe that the dll is intended for it hangs and i have to alt+ctrl+delete to close it. It appears that the issue is most likely coming from:

Code:

hConnection = InternetConnect(hOpen, "localhost", INTERNET_DEFAULT_FTP_PORT, "XXXX", "XXXX", INTERNET_SERVICE_FTP, IIf(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0)
If you need me to elaborate more I can. I can debug my code further but I wanted to check and make sure it isnt just an issue that this API will not work in a DLL.

Is there a better way to upload to ftp inside a dll file.

Viewing all articles
Browse latest Browse all 21103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>