Bon voila... je suis en train d'apprendre le C++ et je veux copier le EXE dans le repertoire de Windows mais ca marche pas:
if(GetWindowsDirectory(lpszSOPPath, MAX_PATH+1))
{
strcat(lpszSOPPath, "\\patate.exe");
if(!IsFileExist((LPSTR *)lpszSOPPath))
{
MessageBox(NULL, lpszSOPPath, "", MB_OK);
GetModuleFileName(NULL, lpszEXEPath, MAX_PATH+1);
MessageBox(NULL, lpszSOPPath, "", MB_OK);
CopyFile(lpszEXEPath, lpszSOPPath, FALSE);
}
}
else
return 0;
Le premier MessageBox affiche: C:\Windows\patate.exe
et le deuxieme: C:\Document and Setting\...\patate\Debug\patate.exe
je comprend pas pourquoi
alors si il a quelqu'un qui pourrai non seulement corriger mon code mais en plus m'expliquer mon erreur j'apprecirai beaucoup!
Merci davance
PinkRabbit84