85b95d70d34cbfb7b3e736b4b43d0c25ca95b728
[reactos.git] / reactos / include / psdk / userenv.h
1 #ifndef _USERENV_H
2 #define _USERENV_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define PI_NOUI (1)
9 #define PI_APPLYPOLICY (2)
10
11 #if (WINVER >= 0x0500)
12 #define RP_FORCE (1)
13 #endif
14
15 /* Values returned by GetProfileType */
16 #if (WINVER >= 0x0500)
17 #define PT_TEMPORARY 1
18 #define PT_ROAMING 2
19 #define PT_MANDATORY 4
20 #endif
21
22 typedef struct _PROFILEINFOA
23 {
24 DWORD dwSize;
25 DWORD dwFlags;
26 LPSTR lpUserName;
27 LPSTR lpProfilePath;
28 LPSTR lpDefaultPath;
29 LPSTR lpServerName;
30 LPSTR lpPolicyPath;
31 HANDLE hProfile;
32 } PROFILEINFOA, *LPPROFILEINFOA;
33
34 typedef struct _PROFILEINFOW
35 {
36 DWORD dwSize;
37 DWORD dwFlags;
38 LPWSTR lpUserName;
39 LPWSTR lpProfilePath;
40 LPWSTR lpDefaultPath;
41 LPWSTR lpServerName;
42 LPWSTR lpPolicyPath;
43 HANDLE hProfile;
44 } PROFILEINFOW, *LPPROFILEINFOW;
45
46 /* begin private */
47 BOOL WINAPI InitializeProfiles (VOID);
48 BOOL WINAPI CreateUserProfileA (PSID, LPCSTR);
49 BOOL WINAPI CreateUserProfileW (PSID, LPCWSTR);
50 BOOL WINAPI AddDesktopItemA (BOOL, LPCSTR, LPCSTR, LPCSTR, INT, LPCSTR, WORD, INT);
51 BOOL WINAPI AddDesktopItemW (BOOL, LPCWSTR, LPCWSTR, LPCWSTR, INT, LPCWSTR, WORD, INT);
52 BOOL WINAPI DeleteDesktopItemA (BOOL, LPCSTR);
53 BOOL WINAPI DeleteDesktopItemW (BOOL, LPCWSTR);
54 BOOL WINAPI CreateGroupA (LPCSTR, BOOL);
55 BOOL WINAPI CreateGroupW (LPCWSTR, BOOL);
56 BOOL WINAPI DeleteGroupA (LPCSTR, BOOL);
57 BOOL WINAPI DeleteGroupW (LPCWSTR, BOOL);
58 BOOL WINAPI AddItemA (LPCSTR, BOOL, LPCSTR, LPCSTR, LPCSTR, INT, LPCSTR, WORD, INT);
59 BOOL WINAPI AddItemW (LPCWSTR, BOOL, LPCWSTR, LPCWSTR, LPCWSTR, INT, LPCWSTR, WORD, INT);
60 BOOL WINAPI DeleteItemA (LPCSTR, BOOL, LPCSTR, BOOL);
61 BOOL WINAPI DeleteItemW (LPCWSTR, BOOL, LPCWSTR, BOOL);
62 BOOL WINAPI CopyProfileDirectoryA(LPCSTR, LPCSTR, DWORD);
63 BOOL WINAPI CopyProfileDirectoryW(LPCWSTR, LPCWSTR, DWORD);
64 /* end private */
65 BOOL WINAPI LoadUserProfileA (HANDLE, LPPROFILEINFOA);
66 BOOL WINAPI LoadUserProfileW (HANDLE, LPPROFILEINFOW);
67 BOOL WINAPI UnloadUserProfile (HANDLE, HANDLE);
68
69 BOOL WINAPI GetAllUsersProfileDirectoryA (LPSTR, LPDWORD);
70 BOOL WINAPI GetAllUsersProfileDirectoryW (LPWSTR, LPDWORD);
71 BOOL WINAPI GetDefaultUserProfileDirectoryA (LPSTR, LPDWORD);
72 BOOL WINAPI GetDefaultUserProfileDirectoryW (LPWSTR, LPDWORD);
73 BOOL WINAPI GetProfilesDirectoryA(LPSTR, LPDWORD);
74 BOOL WINAPI GetProfilesDirectoryW(LPWSTR, LPDWORD);
75 BOOL WINAPI GetUserProfileDirectoryA(HANDLE, LPSTR, LPDWORD);
76 BOOL WINAPI GetUserProfileDirectoryW(HANDLE, LPWSTR, LPDWORD);
77 #if (WINVER >= 0x0500)
78 BOOL WINAPI GetProfileType(PDWORD);
79 #endif
80
81 BOOL WINAPI CreateEnvironmentBlock(LPVOID*, HANDLE, BOOL);
82 BOOL WINAPI DestroyEnvironmentBlock(LPVOID);
83 #if (WINVER >= 0x0500)
84 BOOL WINAPI ExpandEnvironmentStringsForUserA (HANDLE, LPCSTR, LPSTR, DWORD);
85 BOOL WINAPI ExpandEnvironmentStringsForUserW (HANDLE, LPCWSTR, LPWSTR, DWORD);
86 #endif
87
88 HANDLE WINAPI EnterCriticalPolicySection (BOOL);
89 BOOL WINAPI LeaveCriticalPolicySection (HANDLE);
90 BOOL WINAPI RefreshPolicy (BOOL);
91 #if (WINVER >= 0x0500)
92 BOOL WINAPI RefreshPolicyEx (BOOL, DWORD);
93 #endif
94 BOOL WINAPI RegisterGPNotification (HANDLE, BOOL);
95 BOOL WINAPI UnregisterGPNotification (HANDLE);
96
97 #ifdef UNICODE
98 typedef PROFILEINFOW PROFILEINFO;
99 typedef LPPROFILEINFOW LPPROFILEINFO;
100 /* begin private */
101 #define CreateUserProfile CreateUserProfileW
102 #define AddDesktopItem AddDesktopItemW
103 #define DeleteDesktopItem DeleteDesktopItemW
104 #define CreateGroup CreateGroupW
105 #define DeleteGroup DeleteGroupW
106 #define AddItem AddItemW
107 #define DeleteItem DeleteItemW
108 #define CopyProfileDirectory CopyProfileDirectoryW
109 /* end private */
110 #define LoadUserProfile LoadUserProfileW
111 #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW
112 #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryW
113 #define GetProfilesDirectory GetProfilesDirectoryW
114 #define GetUserProfileDirectory GetUserProfileDirectoryW
115 #if (WINVER >= 0x0500)
116 #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserW
117 #endif
118 #else
119 typedef PROFILEINFOA PROFILEINFO;
120 typedef LPPROFILEINFOA LPPROFILEINFO;
121 /* begin private */
122 #define CreateUserProfile CreateUserProfileA
123 #define AddDesktopItem AddDesktopItemA
124 #define DeleteDesktopItem DeleteDesktopItemA
125 #define CreateGroup CreateGroupA
126 #define DeleteGroup DeleteGroupA
127 #define AddItem AddItemA
128 #define DeleteItem DeleteItemA
129 #define CopyProfileDirectory CopyProfileDirectoryA
130 /* end private */
131 #define LoadUserProfile LoadUserProfileA
132 #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA
133 #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryA
134 #define GetProfilesDirectory GetProfilesDirectoryA
135 #define GetUserProfileDirectory GetUserProfileDirectoryA
136 #if (WINVER >= 0x0500)
137 #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserA
138 #endif
139 #endif
140
141 #ifdef __cplusplus
142 }
143 #endif
144
145 #endif /* _USERENV_H */