Fichier INI

cs_Xs Messages postés 368 Date d'inscription mercredi 14 novembre 2001 Statut Membre Dernière intervention 1 septembre 2008 - 22 avril 2002 à 18:22
mmuller57 Messages postés 174 Date d'inscription mardi 10 avril 2001 Statut Membre Dernière intervention 30 juillet 2003 - 22 avril 2002 à 19:30
voila, j'utilise la fonction API

WritePrivateProfileSetting(....)

mais il se trouve que le fichier ini est crée dans le repertoire windows. moi, je veux qu'il se creer dans le rep de mon programme (le rep est variable)

1 réponse

mmuller57 Messages postés 174 Date d'inscription mardi 10 avril 2001 Statut Membre Dernière intervention 30 juillet 2003 1
22 avril 2002 à 19:30
Il faut indiquer le "full path" dans le dernier paramètre comme le dis l'aide :

lpFileName

Points to a null-terminated string containing the name of the initialization file. If this parameter does not contain a full path for the file, the function searches the Windows directory for the file. If the file does not exist and lpFileName does not contain a full path, the function creates the file in the Windows directory. The function does not create a file if lpFileName contains the full path and filename of a file that does not exist.

LE full path est un path du type "C:\MonDossier\..." !

@+
0
Rejoignez-nous