CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    May 2005
    Posts
    399

    Question Finding exact path of 'My documents' folder

    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.

    Code:
    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?
    Last edited by leojose; September 9th, 2005 at 09:07 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured