I have a dialog based application. From the OnInitDialog() I want to build a list of a specific kind of files and update my combo box on the dialog. To get a listing of those kind of files from the hard disk, I call the Win32 functions FindFirstFile and FindNextFile. I had successfully tested these functions from a console app and they seemed to be fine, but my dialog app cannot execute the FindFirstFile and I get an unhandeled exception in NTDLL.DLL for an access violation. Another information that might be helpful is the prototype of FindFirstFile is as:
HANDLE FindFirstFile (LPCTSTR, LPWIN32_FIND_DATA);
My calling sequence is as follows:
char myFile="C:\\*.ppp"; // for example
myHandle = FindFirstFile (myFile, lpFindFileData);
Another question I have is if I can use normal C based char string pointers in place of LPCTSTRS?