| 1 | #ifndef _USERENV_H | 
 
 
 
 
 | 2 | #define _USERENV_H | 
 
 
 
 
 | 3 | #if __GNUC__ >=3 | 
 
 
 
 
 | 4 | #pragma GCC system_header | 
 
 
 
 
 | 5 | #endif | 
 
 
 
 
 | 6 |  | 
 
 
 
 
 | 7 | #ifdef __cplusplus | 
 
 
 
 
 | 8 | extern "C" { | 
 
 
 
 
 | 9 | #endif | 
 
 
 
 
 | 10 | #define PI_NOUI         (1) | 
 
 
 
 
 | 11 | #define PI_APPLYPOLICY  (2) | 
 
 
 
 
 | 12 | #if (_WIN32_WINNT >= 0x0500) | 
 
 
 
 
 | 13 | #define PT_TEMPORARY    (1) | 
 
 
 
 
 | 14 | #define PT_ROAMING      (2) | 
 
 
 
 
 | 15 | #define PT_MANDATORY    (4) | 
 
 
 
 
 | 16 | #endif | 
 
 
 
 
 | 17 | typedef struct _PROFILEINFOA { | 
 
 
 
 
 | 18 | DWORD dwSize; | 
 
 
 
 
 | 19 | DWORD dwFlags; | 
 
 
 
 
 | 20 | LPSTR lpUserName; | 
 
 
 
 
 | 21 | LPSTR lpProfilePath; | 
 
 
 
 
 | 22 | LPSTR lpDefaultPath; | 
 
 
 
 
 | 23 | LPSTR lpServerName; | 
 
 
 
 
 | 24 | LPSTR lpPolicyPath; | 
 
 
 
 
 | 25 | HANDLE hProfile; | 
 
 
 
 
 | 26 | } PROFILEINFOA, *LPPROFILEINFOA; | 
 
 
 
 
 | 27 | typedef struct _PROFILEINFOW { | 
 
 
 
 
 | 28 | DWORD dwSize; | 
 
 
 
 
 | 29 | DWORD dwFlags; | 
 
 
 
 
 | 30 | LPWSTR lpUserName; | 
 
 
 
 
 | 31 | LPWSTR lpProfilePath; | 
 
 
 
 
 | 32 | LPWSTR lpDefaultPath; | 
 
 
 
 
 | 33 | LPWSTR lpServerName; | 
 
 
 
 
 | 34 | LPWSTR lpPolicyPath; | 
 
 
 
 
 | 35 | HANDLE hProfile; | 
 
 
 
 
 | 36 | } PROFILEINFOW, *LPPROFILEINFOW; | 
 
 
 
 
 | 37 | BOOL WINAPI LoadUserProfileA(HANDLE,LPPROFILEINFOA); | 
 
 
 
 
 | 38 | BOOL WINAPI LoadUserProfileW(HANDLE,LPPROFILEINFOW); | 
 
 
 
 
 | 39 | BOOL WINAPI UnloadUserProfile(HANDLE,HANDLE); | 
 
 
 
 
 | 40 | BOOL WINAPI GetProfilesDirectoryA(LPSTR,LPDWORD); | 
 
 
 
 
 | 41 | BOOL WINAPI GetProfilesDirectoryW(LPWSTR,LPDWORD); | 
 
 
 
 
 | 42 | BOOL WINAPI GetUserProfileDirectoryA(HANDLE,LPSTR,LPDWORD); | 
 
 
 
 
 | 43 | BOOL WINAPI GetUserProfileDirectoryW(HANDLE,LPWSTR,LPDWORD); | 
 
 
 
 
 | 44 | BOOL WINAPI CreateEnvironmentBlock(LPVOID*,HANDLE,BOOL); | 
 
 
 
 
 | 45 | BOOL WINAPI DestroyEnvironmentBlock(LPVOID); | 
 
 
 
 
 | 46 | #if (_WIN32_WINNT >= 0x0500) | 
 
 
 
 
 | 47 | BOOL WINAPI DeleteProfileA(LPCSTR,LPCSTR,LPCSTR); | 
 
 
 
 
 | 48 | BOOL WINAPI DeleteProfileW(LPCWSTR,LPCWSTR,LPCWSTR); | 
 
 
 
 
 | 49 | BOOL WINAPI GetProfileType(DWORD *); | 
 
 
 
 
 | 50 | BOOL WINAPI GetAllUsersProfileDirectoryA(LPSTR,LPDWORD); | 
 
 
 
 
 | 51 | BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR,LPDWORD); | 
 
 
 
 
 | 52 | BOOL WINAPI GetDefaultUserProfileDirectoryA(LPSTR,LPDWORD); | 
 
 
 
 
 | 53 | BOOL WINAPI GetDefaultUserProfileDirectoryW(LPWSTR,LPDWORD); | 
 
 
 
 
 | 54 | BOOL WINAPI ExpandEnvironmentStringsForUserA(HANDLE,LPCSTR,LPSTR,DWORD); | 
 
 
 
 
 | 55 | BOOL WINAPI ExpandEnvironmentStringsForUserW(HANDLE,LPCWSTR,LPWSTR,DWORD); | 
 
 
 
 
 | 56 | #endif | 
 
 
 
 
 | 57 | #if (_WIN32_WINNT >= 0x0600) | 
 
 
 
 
 | 58 | HRESULT WINAPI CreateProfile(LPCWSTR,LPCWSTR,LPWSTR,DWORD); | 
 
 
 
 
 | 59 | #endif | 
 
 
 
 
 | 60 | #ifdef UNICODE | 
 
 
 
 
 | 61 | typedef PROFILEINFOW PROFILEINFO; | 
 
 
 
 
 | 62 | typedef LPPROFILEINFOW LPPROFILEINFO; | 
 
 
 
 
 | 63 | #define LoadUserProfile  LoadUserProfileW | 
 
 
 
 
 | 64 | #define GetProfilesDirectory  GetProfilesDirectoryW | 
 
 
 
 
 | 65 | #define GetUserProfileDirectory  GetUserProfileDirectoryW | 
 
 
 
 
 | 66 | #if (_WIN32_WINNT >= 0x0500) | 
 
 
 
 
 | 67 | #define DeleteProfile  DeleteProfileW | 
 
 
 
 
 | 68 | #define GetAllUsersProfileDirectory  GetAllUsersProfileDirectoryW | 
 
 
 
 
 | 69 | #define GetDefaultUserProfileDirectory  GetDefaultUserProfileDirectoryW | 
 
 
 
 
 | 70 | #define ExpandEnvironmentStringsForUser  ExpandEnvironmentStringsForUserW | 
 
 
 
 
 | 71 | #endif | 
 
 
 
 
 | 72 | #else | 
 
 
 
 
 | 73 | typedef PROFILEINFOA PROFILEINFO; | 
 
 
 
 
 | 74 | typedef LPPROFILEINFOA LPPROFILEINFO; | 
 
 
 
 
 | 75 | #define LoadUserProfile  LoadUserProfileA | 
 
 
 
 
 | 76 | #define GetProfilesDirectory  GetProfilesDirectoryA | 
 
 
 
 
 | 77 | #define GetUserProfileDirectory  GetUserProfileDirectoryA | 
 
 
 
 
 | 78 | #if (_WIN32_WINNT >= 0x0500) | 
 
 
 
 
 | 79 | #define DeleteProfile  DeleteProfileA | 
 
 
 
 
 | 80 | #define GetAllUsersProfileDirectory  GetAllUsersProfileDirectoryA | 
 
 
 
 
 | 81 | #define GetDefaultUserProfileDirectory  GetDefaultUserProfileDirectoryA | 
 
 
 
 
 | 82 | #define ExpandEnvironmentStringsForUser  ExpandEnvironmentStringsForUserA | 
 
 
 
 
 | 83 | #endif | 
 
 
 
 
 | 84 | #endif | 
 
 
 
 
 | 85 | #ifdef __cplusplus | 
 
 
 
 
 | 86 | } | 
 
 
 
 
 | 87 | #endif | 
 
 
 
 
 | 88 | #endif /* _USERENV_H */ |