IFTPConnection::DownloadFileEx keep file locked

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
alittera
Posts: 6
Joined: Wed Oct 01, 2008 8:02 am

IFTPConnection::DownloadFileEx keep file locked

Post by alittera » Thu Mar 03, 2011 1:55 pm

Hello,

I have the following problem. I use IFTPConnection::DownloadFileEx to download file, it is downloaded just fine. However even though method returned downloaded file is still locked for some time (i.e. CreateFile on it returns ERROR_SHARING_VIOLATION). Am i doing something wrong, or is it just bug in smartftplib? After some time file becomes unlocked again.


Thanks.

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: IFTPConnection::DownloadFileEx keep file locked

Post by mb » Thu Mar 03, 2011 2:08 pm

Hello.
What is your license key id and what version of the FTP Library are you using?

alittera
Posts: 6
Joined: Wed Oct 01, 2008 8:02 am

Re: IFTPConnection::DownloadFileEx keep file locked

Post by alittera » Thu Mar 03, 2011 3:49 pm

I'm using latest version 2.0.111.0. id:400081860

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: IFTPConnection::DownloadFileEx keep file locked

Post by mb » Thu Mar 03, 2011 4:08 pm

Thank you. Can you provide a sample (C#/C++/VB.NET) which reproduces the problem?

alittera
Posts: 6
Joined: Wed Oct 01, 2008 8:02 am

Re: IFTPConnection::DownloadFileEx keep file locked

Post by alittera » Fri Mar 04, 2011 11:23 am


Thank you. Can you provide a sample (C#/C++/VB.NET) which reproduces the problem?


You can download sample C++ (Visual Studio 2010) project here.
Don't forget to enter your ftp login information and ftp remote file info in ftp_test.h

File locking doesn't happen 100% of the time. Sometimes its unlocked sometimes its not.
My test machine is Windows XP Pro SP3.


Thanks
Last edited by alittera on Fri Mar 04, 2011 12:39 pm, edited 1 time in total.

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: IFTPConnection::DownloadFileEx keep file locked

Post by mb » Fri Mar 04, 2011 6:43 pm

I have sent you the new version of sfFTPLib by email.

alittera
Posts: 6
Joined: Wed Oct 01, 2008 8:02 am

Re: IFTPConnection::DownloadFileEx keep file locked

Post by alittera » Tue Mar 08, 2011 9:52 am

problem is fixed in 114, thanks

Post Reply