2015-05-19 48 views
2

任何人都有这个问题。文件始终文件返回false存在:波科::文件::存在总是返回假

std::string filePath = "C:\\Windows\\system32\\SnippingTool.exe"; 
Poco::File file(filePath); 
bool exist = file.exists(); // Should return true. But alway return false. 
+0

您是否尝试过使用其他文件? – kvorobiev

+0

是不是'System32'? – Hacketo

+0

这与问题来自:http://stackoverflow.com/questions/9993733/system-io-file-existsc-windows-system32-snippingtool-exe-returns-false –

回答

2

回答here

是您的应用程序的32位,但要在64位系统上运行? 如果是这样,请使用 "C:\\Windows\\sysnative\\SnippingTool.exe"

请参阅File System Redirector以解释原因。