1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
HKEY hKey;
char *res = new char[1024];
char *tmp = new char[1024];
DWORD size = MAX_PATH;
string mon_fichier="diodore.ini";
string str="";
LONG lResult = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
_T("Software\\MonSoft\\Essai1"),
0, KEY_READ, &hKey );
if( ERROR_SUCCESS != lResult )
{
return -1;
}
//Recuperation d'un chemin type : c:\\Youpi\\MonSoft1
lResult = RegQueryValueEx( hKey, _T("path"), NULL,
0, (LPBYTE)res, &size );
strcpy(tmp,res);
strcat(tmp,"\\Exec\\Youpi.ini"); |