Home » Community » Newbie corner » [Solved] SFTPBrowser example build failed (SFTPBrowser example buil error: error LNK2019: unresolved external symbol __imp_CertCloseStore referenced in function winstore_close)
Re: SFTPBrowser example build failed [message #61306 is a reply to message #61304] |
Sun, 22 December 2024 11:41   |
Oblivion
Messages: 1221 Registered: August 2007
|
Senior Contributor |
|
|
Hello Scott,
Thank you for your help. It would be better for us all if we fix the issue instead of using a workaround, if possible.
Given your latest log, it appears that the structure returns an invalid file size for the newly created file (it should be 0).
Hopefully, the below patch fixes the issue once and for all:
bool SFtpStream::Open(SFtp& sftp_, const char *filename, dword mode, int acm)
{
if(IsOpen())
Close();
sftp = &sftp_;
int iomode = mode & ~SHAREMASK;
handle = sftp->Open(filename,
iomode == READ
? SFtp::READ
: iomode == CREATE
? SFtp::READ|SFtp::WRITE|SFtp::CREATE|SFtp::TRUNCATE
: SFtp::READ|SFtp::WRITE,
acm
);
if(handle) {
SFtpAttrs attrs;
Zero(attrs);
if(iomode != CREATE && !sftp->GetAttrs(handle, attrs)) {
sftp->Close(handle);
handle = nullptr;
return false;
}
OpenInit(mode, attrs.filesize); // filesize always should be 0 for create|truncate
}
return handle;
}
I would be grateful if you could try this patch and report back.
Also, I have updated the example (attached). It can now:
1) set chunksize
2) set waitstep
3) set compression
4) allows dropping files onto browser for uploading.
As for your other questions:
1. Please keep in mind that SFtpBrowser is a very simple example, demonstrating how to integrate SSH package into a GUI. It is not intended to be a rival for WinSCP or any other commercial app. 
Of course, SSH package allows you to write such applications. In fact I do have a such professional app and its performance is on par with WinScp, if not faster.
To achieve faster transfer speeds with SFtpFileBrowser, you can enable compression and increase the chunksize (preferably to 1 Mib).
2. Again, this is a simple example. However, file partitioning (parallel download of a single, huge file) is possible with SSH package, but it would be a complex app, beyond the scope of this demo. (my app does that too).
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 22 December 2024 12:12] Report message to a moderator
|
|
|
 |
|
[Solved] SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Wed, 18 December 2024 10:55
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Wed, 18 December 2024 14:11
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Thu, 19 December 2024 04:15
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Thu, 19 December 2024 08:11
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Thu, 19 December 2024 10:30
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Thu, 19 December 2024 21:47
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Fri, 20 December 2024 06:05
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Fri, 20 December 2024 08:47
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Fri, 20 December 2024 09:45
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Sat, 21 December 2024 11:11
|
 |
|
Re: SFTPBrowser example build failed
|
 |
|
Re: SFTPBrowser example build failed
By: Oblivion on Sun, 22 December 2024 11:41
|
 |
|
[RESOLVED] Re: SFTPBrowser example build failed
|
 |
|
Re: [RESOLVED] Re: SFTPBrowser example build failed
By: Oblivion on Sun, 22 December 2024 14:55
|
 |
|
Re: [RESOLVED] Re: SFTPBrowser example build failed
|
 |
|
Re: [RESOLVED] Re: SFTPBrowser example build failed
By: Oblivion on Mon, 23 December 2024 08:50
|
 |
|
Re: [RESOLVED] Re: SFTPBrowser example build failed
|
 |
|
Re: [RESOLVED] Re: SFTPBrowser example build failed
By: Oblivion on Sat, 28 December 2024 11:18
|
 |
|
Re: [RESOLVED] Re: SFTPBrowser example build failed
|
Goto Forum:
Current Time: Tue Aug 05 14:42:19 CEST 2025
Total time taken to generate the page: 0.02925 seconds
|