|
Dernière réponse | |
---|---|
Sujet : [C] Fichier ini | |
Carbon_14 | Pour mettre le fichier INI dans le même répertoire que l'EXE, j'utilise
char *ChINI; LngChnNom = 255; if ((ChINI = (char *)malloc(LngChnNom + 1)) == NULL) { LastError = ERR_ALOC; return; } { // Cherche le path pour pas encombrer répertoire Windows avec INI int Long; char *ptr; GetModuleFileName(hInst, ChINI, LngChnNom); ptr = strrchr(ChINI, '.'); Long = (int)(ptr - ChINI); ChINI[Long] = '\0'; strcat(ChINI, ".INI" ); // AJOUTE INI AU NOM DE L'APPLICATION } Ca marche sous Win 3.11 et 95/98/NT. hInst est l'instance du prog. |
Vue Rapide de la discussion |
---|