leojose
September 9th, 2005, 08:44 AM
Hi all,
This is what I do to find the exact path of 'My documents' folder on any XP machine. But it fails on some XP systems.
CRegKey regKey;
regKey.Open(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders")
regKey.QueryValue(NULL,"Personal",&dwValData);
sMyDocumentsPath = (char *)malloc(dwValData);
regKey.QueryValue(sMyDocumentsPath,"Personal",&dwValData)
Can there be any flaws in the above technique?
This is what I do to find the exact path of 'My documents' folder on any XP machine. But it fails on some XP systems.
CRegKey regKey;
regKey.Open(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders")
regKey.QueryValue(NULL,"Personal",&dwValData);
sMyDocumentsPath = (char *)malloc(dwValData);
regKey.QueryValue(sMyDocumentsPath,"Personal",&dwValData)
Can there be any flaws in the above technique?