Hi I wrote a FTP program that uses WinInet.dll and I also use a API call to shell and wait. What Shell and Wait does is I get a value from OpenProcess using the DesiredAccess Flag set to PROCESS_QUERY_INFORMATION. Then I put it into a Do Loop calling GetExitCodeProcess While my return value is STILL_ACTIVE.
I am using VB5 for this. Now in all cases the procedure works except when the FTP exe is called from another program and the FTP has to transfer a large file 158,000 KB and is running more than 1 hour. Then it seems to lock up sometimes. It seems to lock up during the call to GetExitCodeProcess in the Do Loop. I do have a DoEvents in my do loop. What can I do to make sure this process works. I know the FTP process works because I can go to a CMD prompt and get to a ftp prompt login and do a dir and the file is being copied ok, the KB's do change for each dir.
I don't know why it takes this long to FTP the file but it seems only on this server does it take that long. I can FTP the same file to another server and it takes about 3 minutes.