// 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\*.*
Les deux wcstring
et sf.pFrom
sont les mêmes alors pourquoi ne pas gettng réponse lors de l'attribution sf.pFrom =wcstring;
problème de copie de fichier lors de la conversion à LPCTSTR
tout d'abord, il est MFC et non MVC. – Naveen
Pouvez-vous élaborer ce que vous entendez par «Je ne reçois pas de réponse»? C'est assigner ou quelque chose d'autre se passe-t-il? – Naveen
wcscat_s (wcstring, L "\\ *. *"); wcstring [wstrlen (wcstring) + 1] = 0; quel en-tête je dois utiliser pour prendre wstrlen – Sijith