// Convert to a wchar_t*
size_t origsize = strlen(toChar) + 1;
const size_t newsize = 100;
size_t convertedChars = 0;
wchar_t wcstring[newsize];
mbstowcs_s(&convertedChars, wcstring, origsize, toChar, _TRUNCATE);
wcscat_s(wcstring, L"\\*.*\0");
wcout << wcstring << endl; // C:\Documents and Settings\softnotions\Desktop\Release\*.*
SHFILEOPSTRUCT sf;
memset(&sf,0,sizeof(sf));
sf.hwnd = 0;
sf.wFunc = FO_COPY;
//sf.pFrom =wcstring; /* when giving wcstring i am not getting answer */
sf.pFrom = L"C:\\Documents and Settings\\softnotions\\Desktop\\Release\\*.*\0";
wcout << sf.pFrom <<endl; // C:\Documents and Settings\softnotions\Desktop\Release\*.*
Both wcstring
and sf.pFrom
are same then why not gettng answer when assigning sf.pFrom =wcstring;