Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #61292 is a reply to message #61291] Fri, 20 December 2024 06:05 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1215
Registered: August 2007
Senior Contributor
Hello Scott,

In order to see what's wrong with writing a file and isolate it (Unfortunately I can't reproduce the error), could you replace the below method. Use a small file to test uploading please.

void SFtpBrowser::Transfer(int opcode, const String src, const String& dest)
{
	SFtp worker(session);
	Progress pi(this, src);

	worker.WhenProgress = [&pi](int64 done, int64 total)
	{
		pi.SetText(
			Format(
				t_("%1:s of %2:s is transferred"),
				FormatFileSize(done),
				FormatFileSize(total)
			)
		);
		return pi.SetCanceled(int(done), int(total));
	};
	pi.Create();
	switch(opcode) {
		case GET: {
			pi.Title(t_("Downloading ") << GetFileName(src));
			FileOut fout(dest);
			if(fout && !worker.LoadFile(fout, src))
				ErrorOK(DeQtf(worker.GetErrorDesc()));
			break;
		}
		case PUT: {
			pi.Title(t_("Uploading ") << GetFileName(src)); // Not for use, only for testing
			String s = LoadFile(src);
			if(auto h = worker.OpenWrite(dest); h) {
				int n = worker.Put(h, ~s, s.GetLength());
				RLOG(String() << "Uploaded: " << n << ", filesize: " << s.GetLength());
				RDUMP(worker.IsError());
				if(worker.IsError())
					ErrorOK(DeQtf(worker.GetErrorDesc()));
				worker.Close(h);
			}
			else
				RLOG("Couldn't open file: " << src << ", error: " << worker.GetErrorDesc());
			break;
		}
	}
	LoadDir();
}





Best regards,
Oblivion


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Latest U++ PDF version user guide to describe framework/tips/examples
Next Topic: The UPP looks good -> Opportunities to evolve to better support RPA & AI
Goto Forum:
  


Current Time: Sat Jul 19 04:40:40 CEST 2025

Total time taken to generate the page: 0.03969 seconds