Using FindFirstFile()

I've been trying to figure out how to use the FindFirstFile function all day, and cannot figure out how to get the first argument in the correct type (LPCWSTR). From the Googling I've done, it appears that it is pretty much asking for a pointer to wide char as the first argument, but apparently its not because it won't accept that. So basically, what do I use for the first argument? (I need to be able to use a variable in the first argument, as the user tells it which file to look for)

EDIT: After another hour or so of searching and reading, I've finally figured it out! :DD So for anyone else who maybe stumbles upon this thread, what I had to do was use a slightly modified version of the FindFirstFile() which is called FindFirstFileA(). It lets you use a normal char array as the first argument, instead of wchar_t. I looked all over the msdn site but for some reason I can't find any references about this variation, so maybe they don't have it marked or (more likely) I just didn't read close enough. So...yeah, this question is solved.
Last edited on
Topic archived. No new replies allowed.