Find a file in a directory
I am trying to FindFirstFile() in a selected path using folderBrowserDialog1.
I have wrote "C:\\*.*" as a test and get this compile error: Later I beleive I will put this as my Directory as I use a
BrowserDialog: ("folderBrowserDialog1->SelectedPath;" ?)
FindFirstFileW' : cannot convert parameter 1 from 'const char [10]' to 'LPCWSTR'
Any Idéas of why this is happening ?
Code:
folderBrowserDialog1->ShowDialog();
WIN32_FIND_DATA FindFileData;
HANDLE hFind = INVALID_HANDLE_VALUE;
TCHAR DirSpec[100];
// My directory will be: folderBrowserDialog1->SelectedPath;
hFind = FindFirstFile("C:\\*.*" , &FindFileData);