Milan Babuskov wrote:
> grampstrains wrote:
>> How do I access the "My Documents" directory from a program since the 
>> location of that directory depends on what user is logged in?  I am 
>> using C++ Builder 4.  I want to access the directory from the program 
>> without having to use the FileOpen or FileSave dialogs.
> 
> Take a look at Windows API function SHGetFolderPath (at http://msdn.com 
> for example)

Read the system requirements before recommending Win32 APIs. 
SHGetFolderPath is available to Win2000 and later 
(Win2000/XP/2003/Vista).  Win95/98/Me/NT require the SHFolder.dll 
redistributable and a special linking order.  AND it is limited as to 
what CSIDLs it supports.

OP:  Use SHGetSpecialFolderPath() with CSIDL_PERSONAL.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* VerifyMyPC 2.2
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.

Free for personal use, $10 otherwise.
http://www.CubicleSoft.com/VerifyMyPC/

Reply via email to