W3C home > Mailing lists > Public > www-amaya@w3.org > January to March 2004

Re: Amaya and winnt\profiles (fwd)

From: Stanimir Stamenkov <stanio@myrealbox.com>
Date: Wed, 28 Jan 2004 12:48:12 +0200
Message-ID: <4017936C.9090800@myrealbox.com>
To: www-amaya@w3.org

> We're using semi-hardcoded paths. We're using the Win32 GetUserName()
> and GetWindowsDirectory() system calls to build the path 
> to the profiles directory.

Please, use the following functions to obtain the user profile 
directory:

<http://msdn.microsoft.com/library/en-us/policy/policy/profiles_directory.asp>:

> To obtain the location of a particular user's directory, call the 
> GetUserProfileDirectory function.
> [...]
> 
> To obtain the location of subdirectories of these directories, use 
> the SHGetFolderPath function.

One could use GetUserProfileDirectory adding "Application 
Data\Amaya" or just "amaya" which works for WinNT/2000/XP or better 
use SHGetSpecialFolderPath[1] with CSIDL_APPDATA parameter adding 
"Amaya" which should work for all Windows versions past Win95/NT4 
with IE 4 installed.

[1] 
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp

-- 
Stanimir
Received on Wednesday, 28 January 2004 05:48:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:30:43 UTC