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 #61301 is a reply to message #61299] Sat, 21 December 2024 11:11 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1221
Registered: August 2007
Senior Contributor
Hello Scott,

Thank you for your patience and feedback.

I see no difference between your updated transfer code and SFtp::CopyData, which is used by SFtpFileStream derived class.
However, I suspect the server's filesystem does not support truncation, which is set by SFtpFileOut, by default, and it is NOT set by plain SFtp::OpenWrite method.
That might be the culprit, newer servers, especially flash-based ones don't support it, so the operation fails. (At least my theory).

Can you modify the SFtpStream.cpp file in SSH package and then test the original code with streams?

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 // <- remove SFtp::TRUNCATE
								: SFtp::READ|SFtp::WRITE,
						acm
						);
				
	if(handle) {
		SFtpAttrs attrs;
		if(!sftp->GetAttrs(handle, attrs)) {
			sftp->Close(handle);
			handle = nullptr;
			return false;
		}
		OpenInit(mode, attrs.filesize);
	}
	return handle;
}



I will try to answer your other questions as well. Smile

Best regards,

Oblivion


[Updated on: Sat, 21 December 2024 11:12]

Report message to a moderator

 
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: Tue Aug 05 14:45:55 CEST 2025

Total time taken to generate the page: 0.03038 seconds