void AppPathInitialize() { char szThis[300]; char* c = szThis + GetModuleFileName(NULL, szThis, 300); while(*c != '\\') c--; *c = 0; SetCurrentDirectory(szThis); }
dans WinMain(...): AppPathInitialize(); pour etre sur que currentdirectory soit dossier de ton exe.
Ensuite ouvre tes fichiers normalement HANDLE hfl = CreateFile("Test.txt",...);
ciao... BruNews, Admin CS, MVP Visual C++
|