title: Get path to My Documents
body: <p>From Visual C++, how do I get the path to the current user's My Documents folder?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I have this:</p>
  
  <pre><code>TCHAR my_documents[MAX_PATH];
  HRESULT result = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, my_documents);
  </code></pre>
  
  <p>However, <code>result</code> is coming back with a value of <code>E_INVALIDARG</code>. Any thoughts as to why this might be?</p>