Re: Amaya and winnt\profiles (fwd)

Hello Gary,

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

Here's an extract (from Amaya/thotlib/base/registry.c)

........
   dwSize = sizeof (username);
   status = GetUserName (username, &dwSize);
   if (status)
     ptr = username;
  /* winnt: apphome is windowsdir\profiles\username\appname */
  dwSize = MAX_PATH;
  GetWindowsDirectory (windir, dwSize);
  sprintf (app_home, "%s\\profiles\\%s\\%s", windir, ptr, AppNameW);
.........

app_home will point to the user home dir.

Someone in the list had posted an alternate algorithm for Win2K, but we
haven't yet been able to play with it. Mostly, if that algorithm is not
portable under WinNT, we need to know how to identify that we're running
under Win2K... We have a system call to do so, but not a Win2K box around
here to know what it would return :)

Any contribution is welcome and we still have time to integrate it before
the next release.

-jose

On Fri, Oct 05, 2001 at 09:14:21AM -0400, klescgl@NU.COM wrote:
> 
> Are you using hardcoded paths here? Under Win2k, the paths are different,
> again.
> 
> There are functions within the Win environment that you can use to locate
> these paths, that may help out Christoph, assuming he has configured the
> paths to be picked up automagically.
> 
> It has something to do with SpecialPaths, but I couldn't find it in MSDN
> this morning... But it is part of the scripting runtime, for sure.

Received on Friday, 5 October 2001 09:44:27 UTC