[SDL] Filehandling

David Olofson david.olofson at reologica.se
Mon Mar 4 13:23:01 PST 2002


On Monday 04 March 2002 21:26, Andrew Murie wrote:
> Quoting David Olofson <david.olofson at reologica.se>:
> > Simple question: (I would think...)
>
> for certain values of 'simple' anyway  :)
>
> > How do you find out where the profile dir is, in a way that works on
> > any
> >
> > Win32? Or, if I'm *not* supposed to use it on some Windows version,
> > how
> >
> > do I find that out?
>
> The DLL shfolder.dll has a function SHGetFolderPath that takes the ID
> of the folder you're looking for, and returns the actual path. Useful
> values are CSIDL_APPDATA (user specific app data - save files and such
> should go here) and CSIDL_COMMON_APPDATA (shared data - maps, textures,
> etc should go here). Note that the 'common' directories are read-only
> for normal users undermost recent Windows versions (NT/2000/XP)  The
> directory found as CSIDL_PROFILE (C:\Documents And Settings\Username or
> something like that :) may well be the only directory you can write to
> as a normal user. Of course, this includes your desktop, My Documents,
> etc)  There's a whole lot more things that function can find, too -
> search for it on msdn.microsoft.com for more info.
>
> This DLL is standard in NT and derivatives, supplied with recent
> versions of IE (5.0 and above), and is a redistributable for earlier
> versions (ie, Win95 without a recent IE). That may or may not count as
> good news.

It's pretty bad news to me, as I don't want to depend on something that 
will only be available on NT derivates... I would think that it's 
possible to find this information using some API that is actually a part 
of the "standard" Win32 API.


//David Olofson --- Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------------> http://www.linuxdj.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`-------------------------------------> http://olofson.net -'




More information about the SDL mailing list