Winapi: programatically obtain path of special folder given its CLSID as string -


Does the Windows API offer any way to get a special folder path (i.e. my document), whose CLSID Used as a string (i.e.:: {450d8fba-ad25-11d0-98a8-0800361b1103})? Can it be done in any way? Additionally, it should be done with functions supported under Windows XP.

Thank you in advance.

The basic API SHParseDisplayName required for you. This will take the form path to :: GUID} and convert it to PIDL.

If PIDL contains a string form (as is your example, because it resolves the documents folder), you can use SHGetPathFromIDList to change it.

  LPITEMIDLIST pidl; If (SUCCEEDED (SHParseDisplayName (L ":: {450d8fba-ad25-11d0-98a8-0800361b1103}", nullptr, and pidl, 0, nullptr))) {wchar_t wchPath [MAX_PATH]; If (SUCCEEDED (SHGetPathFromIDList (pidl, wchPath))) {// the string form of the path is now wchPath} in ILFree (pidl); }    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -