I'll start by saying I know basically nothing about wide strings and Unicode support. I let QString and QFile handle that for me 99% of the time, but I'm trying to compile someone else's library written for VC6.
When I compile with MSVC2010 in Qt Creator I get this error:
error: C2664: 'FindFirstFileW' : cannot convert parameter 1 from 'const char *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
The code is using the FindFirstFile
function, which is overloaded (sort of) depending on whether you're compiling with the Unicode character set. I don't understand what type FindFirstFile
is expecting, when the input for FindFirstFileA and FindFirstFileW seems to be two completely different types.
So here's my question: What is the expected input type for FindFirstFile
?
Corollary: How do I take a filename of type const char*
and put it into a form that FindFirstType will accept?