FindFirstFile type problems
I'm writing a function that will check if there's a jpg file in the given folder. My try at this is as follows:
int containsJpgs(String ^path)
{
WIN32_FIND_DATA data;
HANDLE hFind;
hFind = FindFirstFile(path + "*.jpg", &data); // Type error.
if (hFind == INVALID_HANDLE_VALUE)
{
return 0;
开发者_StackOverflow}
return 1;
}
How do I append a System::String ^
to a LPCTSTR
to get LPCTSTR
? And will the above code work when I do that, or are there other problems?
what about lstrcat()?
EDIT: to convert system::string^ to lpctstr I found this
精彩评论