Re User Profile Path

Sorry i have sorted it

//the includes

#include “SDL_syswm.h”
#include “SDL_version.h”
#include “Shlobj.h”

//the code

#ifdef WIN32
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if ( SDL_GetWMInfo(&info) > 0 )
{
TCHAR szPath[MAX_PATH];
if(SUCCEEDED(SHGetFolderPath(info.window,

CSIDL_PERSONAL|CSIDL_FLAG_CREATE,

NULL,

SHGFP_TYPE_CURRENT,

szPath)))
{
// Write my file here

}
}
#endif

szPath gives me c:\Documents and Settings\Trish\My Documents change
the CSIDL_PERSONAL for differnt places to store your files

Trish

is this something that will affect all games running on vista?

not allowed to write in a directory?

do i hate vista already?

i dont understand… was it just your preference you wanted to write in a
specific users directory or is that a new vista feature?----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

obviously i should do this for my games for when running on linux anyways,
but usually i like to assume that whoever is using my game for the 3 mins
before they delete it, can at least write to it’s directory and stuff.

(another obscure email from (at) cloudsprtinter.com ™ ® all rights
reserved)

Quoting Neil White :

*->
*-> is this something that will affect all games running on vista?
*->
*-> not allowed to write in a directory?
*->
*-> do i hate vista already?
*->
*-> i dont understand… was it just your preference you wanted to write in a
*-> specific users directory or is that a new vista feature?
*->
*-> ----------------------------------------------------------------
*-> This message was sent using IMP, the Internet Messaging Program.
*->
*->
*-> _______________________________________________
*-> SDL mailing list
*-> SDL at lists.libsdl.org
*-> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
*->
*-> e-mail provided by Moose Internet Services
*-> http://www.moose.co.uk/
*->
*->–

Nice.


This message was sent using IMP, the Internet Messaging Program.

I have finished my game and it runs on all pre Vista windows systems no
problems but on Vista i had a crash on the exit which was the at the point i
saved my game. I was getting bug reports back from Oberon media stating it
crashes on vista and i started looking around the net for almost half a day.
it turns out that vista has even tighter privileges / restrictions, probably
to stop Joe blogs hitting you with some virus or porno link when browsing
the net.

Anyhow to cut a long story short, Vista wont let you write to anywhere
except the users profile space with UAC off (no administrator rites) so the
best place is to write to directory you have made in Application data within
the users profile if that makes any sense.

Trish

What I know is that on any windows NT, when you are not an administrator you
cannot write on the program files directory, there why they created the
aplications path.

Regards
Bruno SanchesOn 3/8/07, Neil White wrote:

is this something that will affect all games running on vista?

not allowed to write in a directory?

do i hate vista already?

i dont understand… was it just your preference you wanted to write in a
specific users directory or is that a new vista feature?


This message was sent using IMP, the Internet Messaging Program.


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

not allowed to write in a directory?

do i hate vista already?

Probably. But this was actually a GOOD THING…i guess Microsoft knew
this would cause friction for the first year or two (and forever on
legacy code), but they finally bit the bullet and did it.

They should have forced this in the first release of Win95, if you ask me.

Never, never, never write to your game directory, Vista or not. It
doesn’t work on Vista, and it’s almost never worked on Mac OS X or
Linux, either. Assume more than one person will use the machine, and
each has their own filespace.

–ryan.

Hi,

Sorry for only saying this now, but I’m currently on
vacations and only checking the net every now and then.

Microsoft has communicated this issue quite often to all
Windows developers.

Here you can get a full info how this process works on
vista. They are only enforcing what used to be a recommended
practice for XP, that few software houses did follow:

http://msdn2.microsoft.com/en-us/library/aa480150.aspx
http://msdn2.microsoft.com/en-us/library/aa905330.aspx

Cheers,
Paulo

Selon Patricia Curtis <patricia.curtis at gmail.com>:> I have finished my game and it runs on all pre Vista windows systems no

problems but on Vista i had a crash on the exit which was the at the point
i saved my game. I was getting bug reports back from Oberon media stating
it crashes on vista and i started looking around the net for almost half a
day. it turns out that vista has even tighter privileges / restrictions,
probably to stop Joe blogs hitting you with some virus or porno link when
browsing the net.

Anyhow to cut a long story short, Vista wont let you write to anywhere
except the users profile space with UAC off (no administrator rites) so
the best place is to write to directory you have made in Application data
within the users profile if that makes any sense.

Trish


This message was sent using IMP, the Internet Messaging Program.