From 700c641dfa72b292a231810ab35d93849f4c8fe1 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 29 Mar 2011 08:43:17 +0000 Subject: [PATCH] * include/userenv.h: Add functions and definitions added with Windows 2000 and Vista. --- winsup/w32api/ChangeLog | 5 +++++ winsup/w32api/include/userenv.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index d3938a90a..98eb7da5b 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 Corinna Vinschen + + * include/userenv.h: Add functions and definitions added with Windows + 2000 and Vista. + 2011-03-25 Chris Sutcliffe * Makefile.in: Increment CYGRELEASE to 2. diff --git a/winsup/w32api/include/userenv.h b/winsup/w32api/include/userenv.h index fad9f813b..c84ccf886 100644 --- a/winsup/w32api/include/userenv.h +++ b/winsup/w32api/include/userenv.h @@ -9,6 +9,11 @@ extern "C" { #endif #define PI_NOUI (1) #define PI_APPLYPOLICY (2) +#if (_WIN32_WINNT >= 0x0500) +#define PT_TEMPORARY (1) +#define PT_ROAMING (2) +#define PT_MANDATORY (4) +#endif typedef struct _PROFILEINFOA { DWORD dwSize; DWORD dwFlags; @@ -38,18 +43,44 @@ BOOL WINAPI GetUserProfileDirectoryA(HANDLE,LPSTR,LPDWORD); BOOL WINAPI GetUserProfileDirectoryW(HANDLE,LPWSTR,LPDWORD); BOOL WINAPI CreateEnvironmentBlock(LPVOID*,HANDLE,BOOL); BOOL WINAPI DestroyEnvironmentBlock(LPVOID); +#if (_WIN32_WINNT >= 0x0500) +BOOL WINAPI DeleteProfileA(LPCSTR,LPCSTR,LPCSTR); +BOOL WINAPI DeleteProfileW(LPCWSTR,LPCWSTR,LPCWSTR); +BOOL WINAPI GetProfileType(DWORD *); +BOOL WINAPI GetAllUsersProfileDirectoryA(LPSTR,LPDWORD); +BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR,LPDWORD); +BOOL WINAPI GetDefaultUserProfileDirectoryA(LPSTR,LPDWORD); +BOOL WINAPI GetDefaultUserProfileDirectoryW(LPWSTR,LPDWORD); +BOOL WINAPI ExpandEnvironmentStringsForUserA(HANDLE,LPCSTR,LPSTR,DWORD); +BOOL WINAPI ExpandEnvironmentStringsForUserW(HANDLE,LPCWSTR,LPWSTR,DWORD); +#endif +#if (_WIN32_WINNT >= 0x0600) +HRESULT WINAPI CreateProfile(LPCWSTR,LPCWSTR,LPWSTR,DWORD); +#endif #ifdef UNICODE typedef PROFILEINFOW PROFILEINFO; typedef LPPROFILEINFOW LPPROFILEINFO; #define LoadUserProfile LoadUserProfileW #define GetProfilesDirectory GetProfilesDirectoryW #define GetUserProfileDirectory GetUserProfileDirectoryW +#if (_WIN32_WINNT >= 0x0500) +#define DeleteProfile DeleteProfileW +#define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW +#define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryW +#define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserW +#endif #else typedef PROFILEINFOA PROFILEINFO; typedef LPPROFILEINFOA LPPROFILEINFO; #define LoadUserProfile LoadUserProfileA #define GetProfilesDirectory GetProfilesDirectoryA #define GetUserProfileDirectory GetUserProfileDirectoryA +#if (_WIN32_WINNT >= 0x0500) +#define DeleteProfile DeleteProfileA +#define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA +#define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryA +#define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserA +#endif #endif #ifdef __cplusplus }