How to expanding environmental variables?

Yuri Khan yurivkhan at gmail.com
Mon Jul 20 04:08:13 CDT 2009


On Sat, Jul 18, 2009 at 06:16, Austin English<austinenglish at gmail.com> wrote:
> I need a portable way to get to the shared documents folder, e.g.,:
> Windows XP:
> C:\Documents and Settings\All Users\Shared Documents
> WIndows Vista:
> C:\users\Public\Public Documents
> Wine:
> C:\users\Public\Documents

In Windows, the proper portable way is to #include <shlobj.h>, link to
shell32.lib and call SHGetFolderPath for CSIDL_COMMON_DOCUMENTS. Works
on Windows 9x with IE5 installed, and on all NT-family systems. It
also seems to be implemented in current Wine.

http://msdn.microsoft.com/en-us/library/bb762181%28VS.85%29.aspx



More information about the wine-devel mailing list