[SDL] Widowns User Profile Path

Patricia Curtis patricia.curtis at gmail.com
Wed Mar 7 23:52:46 PST 2007


Hi Guys
          Again sorry for the screw up in posting the whole digest again but
please remember i am just a dizzy girl. Now need to implement a saved game
file, no problem i hear you say, but on windows vista i can not write the
file in the game directory i must write it to the usersProfile space
typically C:\Documents and settings\UserName\MyGameName\ so i believe i need
to call some windows functions like

HRESULT SHGetFolderPath(
    HWND *hwndOwner*,
    int *nFolder*,
    HANDLE *hToken*,
    DWORD *dwFlags*,
    LPTSTR *pszPath*
);
i have included  "SDL_syswm.h" which gives me a data structure for
SDL_SysWMinfo
but how do i fill the structure out?
how do i get HWND and the *CSIDL* (nFolder) value typically CSIDL_PERSONAL
or CSIDL_PROGRAM_FILES or CSIDL_APPDATA.

Or have i totally missed the point about the whole Shebang? by the way i
think this is down to my Vista crash i reported a while back, as i believe i
cant write to the game DIR because of some security permissions on Visa.

Trish (dizzy girl but no dumb blond)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070308/fda1bbce/attachment.html 


More information about the SDL mailing list