20 Jul
2009
20 Jul
'09
10:08 a.m.
On Sat, Jul 18, 2009 at 06:16, Austin English<austinenglish(a)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