void file_explore(std::wstring str) {
ITEMIDLIST *pIDL = ILCreateFromPath(str.c_str());
if ( NULL != pIDL ) {
SHOpenFolderAndSelectItems(pIDL , 0 , 0 , 0);
ILFree(pIDL);
} else {
std::wstring p = str.substr(0 , str.find_last_of('\\'));
ShellExecute(NULL , L"explore" , p.c_str() , NULL , NULL , SW_SHOWNORMAL);
}
}
The above compiles without warning for 32bit but with 64bit I get warning c4090 however the docs: https://msdn.microsoft.com/en-us/library/k77bkb8d.aspx state that this is a c error and I will get C2440 for c++ yet I'm using c++.
The line of code complained of is:
ITEMIDLIST *pIDL = ILCreateFromPath(str.c_str());
How to fix this issue for 64bit builds?