O.T.-How do i find the user folder on P.C. Windows platform using C++?

O.T.-How do i find the user folder on P.C. Windows platform using C++???

Need a place to store game options and high scores
that will ALWAYS be available for loading and saving.
(even on a networked workstations)

Any help with this would be appreciated…

Using C++ and P.C. Windows platform.

Jesse “JeZ+Lee” Palser
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

The Windows API function SHGetSpecialFolderPath should work for this. Check the MSDN documentation for proper syntax and whatnot.>----- Original Message ----

From: Jesse P.
Subject: [SDL] O.T.-How do i find the user folder on P.C. Windows platform using C++???

O.T.-How do i find the user folder on P.C. Windows platform using C++???

Need a place to store game options and high scores
that will ALWAYS be available for loading and saving.
(even on a networked workstations)

Any help with this would be appreciated…

Using C++ and P.C. Windows platform.

How much “ALWAYS” do you mean?

I have heard from schools where they have made the user dir read only.
Only some temp folders were writable there.

But you can get the temp folder also via SHGetSpecialFolderPath.On Thu, 2008-06-12 at 12:22 -0700, Mason Wheeler wrote:

The Windows API function SHGetSpecialFolderPath should work for this. Check the MSDN documentation for proper syntax and whatnot.

----- Original Message ----
From: Jesse P.
Subject: [SDL] O.T.-How do i find the user folder on P.C. Windows platform using C++???

O.T.-How do i find the user folder on P.C. Windows platform using C++???

Need a place to store game options and high scores
that will ALWAYS be available for loading and saving.
(even on a networked workstations)

Any help with this would be appreciated…

Using C++ and P.C. Windows platform.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

O.T.-How do i find the user folder on P.C. Windows platform using C++???

See the following for an example:

http://code.google.com/p/quadra/source/browse/branches/quadra-sdl/source/quadra.cpp?r=539#1823On Thu, Jun 12, 2008 at 3:18 PM, Jesse P. wrote:


http://pphaneuf.livejournal.com/

Hi Albert,

I mean “ALWAYS”…

There MUST be a location that a game’s data file can always be saved too
on Windows???

How are people at work and at school on networked workstations supposed
to play my games?

Any thoughts on this would be appreciated!

PS - StarCraft 2 looks awesome Sam! Can’t wait to play it!!!

Jesse “JeZ+Lee” Palser
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

Albert Zeyer wrote:> How much “ALWAYS” do you mean?

I have heard from schools where they have made the user dir read only.
Only some temp folders were writable there.

But you can get the temp folder also via SHGetSpecialFolderPath.

On Thu, 2008-06-12 at 12:22 -0700, Mason Wheeler wrote:

The Windows API function SHGetSpecialFolderPath should work for this. Check the MSDN documentation for proper syntax and whatnot.

----- Original Message ----
From: Jesse P.
Subject: [SDL] O.T.-How do i find the user folder on P.C. Windows platform using C++???

O.T.-How do i find the user folder on P.C. Windows platform using C++???

Need a place to store game options and high scores
that will ALWAYS be available for loading and saving.
(even on a networked workstations)

Any help with this would be appreciated…

Using C++ and P.C. Windows platform.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Mason Wheeler wrote:

The Windows API function SHGetSpecialFolderPath should work for this. Check the MSDN documentation for proper syntax and whatnot.

O.T.-How do i find the user folder on P.C. Windows platform using C++???

Need a place to store game options and high scores
that will ALWAYS be available for loading and saving.
(even on a networked workstations)

One of the arguments to main() [though rarely used] is a pointer to an
array of strings that comprise the environment. Each string is
constructed thus: “ENV_VAR_NAME=ARBITRARY_VALUE”

On windows XP, the current users directory is stored in a pair of
variables. The drive is stored in HOMEDRIVE and the path is contained in
HOMEPATH.

So if you were to scan those strings, you might find …
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\YourName

Given those two strings and some parsing skills, you can construct the
path to YourName’s home directory.>> ----- Original Message ----

From: Jesse P.
Subject: [SDL] O.T.-How do i find the user folder on P.C. Windows platform using C++???

Any help with this would be appreciated…

Using C++ and P.C. Windows platform.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello !

I mean “ALWAYS”…

There MUST be a location that a game’s data file can always be saved
too on Windows???

How are people at work and at school on networked workstations supposed
to play my games?

Any thoughts on this would be appreciated!

That depends on what you need to save.

For temporary files you can ask the systems
TEMP and/or TMP variable.

For save games you can ask the User with some
dialog box where to save the save games.

CU

Hello !

There MUST be a location that a game’s data file can always be saved too
on Windows???

How are people at work and at school on networked workstations supposed
to play my games?

Any thoughts on this would be appreciated!

Personally i prefer Apps in two ways, an Installer and a ZIP version.
The Installer version should ask the system about User Directorys, TEMP dirs
and so on. The ZIP File version should allow the user to simply extract
the game/app to a directory the user wants and than run from that dir.

CU

Hi,

I think i got it, but thanks for the help.

I do have two separate downloads:

  1. A Windows EXE installer package.
  2. A ZIP folder of the game.

Thanks again!

Blizzard Entertainment’s StarCraft 2
(The Greatest RTS Of All Time)
Is set to be released in December!!!
Thanks Sam!

Jesse “JeZ+Lee” Palser
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

Torsten Giebl wrote:> Hello !

There MUST be a location that a game’s data file can always be saved too
on Windows???

How are people at work and at school on networked workstations supposed
to play my games?

Any thoughts on this would be appreciated!

Personally i prefer Apps in two ways, an Installer and a ZIP version.
The Installer version should ask the system about User Directorys, TEMP dirs
and so on. The ZIP File version should allow the user to simply extract
the game/app to a directory the user wants and than run from that dir.

CU


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

This is from Stella (multi-platform Atari 2600 emulator):

http://stella.cvs.sourceforge.net/stella/stella/src/win32/OSystemWin32.cxx?revision=1.25&view=markup

Note that SHGetFolderPathA() isn’t linked in by default in Win98, so it
needs to be opened dynamically; the attached code does that.

This code has been tested in Win95/98/ME/XP 32-bit and Vista 32/64-bit.

SteveOn June 12, 2008 4:48:29 pm Jesse P. wrote:

O.T.-How do i find the user folder on P.C. Windows platform using
C++???

O.T.-How do i find the user folder on P.C. Windows platform using C++???

Need a place to store game options and high scores
that will ALWAYS be available for loading and saving.
(even on a networked workstations)

Any help with this would be appreciated…

Using C++ and P.C. Windows platform.

Jesse “JeZ+Lee” Palser
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

fnkdat is a simple little library for just this purpose.

http://www.maccormack.net/~djm/fnkdat/

DaveOn Thu, 12 Jun 2008, Jesse P. wrote: