ReactOS  0.4.14-dev-604-gcfdd483
userenv.h
Go to the documentation of this file.
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 {
33 
34 typedef struct _PROFILEINFOW
35 {
45 
46 #if (WINVER >= 0x0502)
47 typedef enum _GPO_LINK {
48  GPLinkUnknown = 0,
49  GPLinkMachine,
50  GPLinkSite,
51  GPLinkDomain,
52  GPLinkOrganizationalUnit
53 } GPO_LINK, *PGPO_LINK;
54 
55 typedef struct _GROUP_POLICY_OBJECTA {
57  DWORD dwVersion;
58  LPSTR lpDSPath;
59  LPSTR lpFileSysPath;
61  CHAR szGPOName[50];
62  GPO_LINK GPOLink;
63  LPARAM lParam;
64  struct _GROUP_POLICY_OBJECTA *pNext;
65  struct _GROUP_POLICY_OBJECTA *pPrev;
66  LPSTR lpExtensions;
67  LPARAM lParam2;
68  LPSTR lpLink;
69 } GROUP_POLICY_OBJECTA, *PGROUP_POLICY_OBJECTA;
70 
71 typedef struct _GROUP_POLICY_OBJECTW {
73  DWORD dwVersion;
74  LPWSTR lpDSPath;
75  LPWSTR lpFileSysPath;
77  WCHAR szGPOName[50];
78  GPO_LINK GPOLink;
79  LPARAM lParam;
80  struct _GROUP_POLICY_OBJECTW *pNext;
81  struct _GROUP_POLICY_OBJECTW *pPrev;
82  LPWSTR lpExtensions;
83  LPARAM lParam2;
84  LPWSTR lpLink;
85 } GROUP_POLICY_OBJECTW, *PGROUP_POLICY_OBJECTW;
86 #endif
87 
88 /* begin private */
110 /* end private */
111 
112 #if(WINVER >= 0x0500)
115 #endif
119 
128 #if (WINVER >= 0x0500)
130 #endif
131 
134 #if (WINVER >= 0x0500)
137 #endif
138 
139 #if (WINVER >= 0x0502)
140 DWORD
141 WINAPI
144  _In_ LPCSTR pMachineName,
145  _In_ PSID pSidUser,
146  _In_ GUID *pGuidExtension,
147  _Out_ PGROUP_POLICY_OBJECTA *ppGPOList
148 );
149 DWORD
150 WINAPI
153  _In_ LPCWSTR pMachineName,
154  _In_ PSID pSidUser,
155  _In_ GUID *pGuidExtension,
156  _Out_ PGROUP_POLICY_OBJECTW *ppGPOList
157 );
158 #endif
159 
163 #if (WINVER >= 0x0500)
165 #endif
168 
169 #ifdef UNICODE
170 typedef PROFILEINFOW PROFILEINFO;
172 /* begin private */
173 #define CreateUserProfile CreateUserProfileW
174 #define CreateUserProfileEx CreateUserProfileExW
175 #define AddDesktopItem AddDesktopItemW
176 #define DeleteDesktopItem DeleteDesktopItemW
177 #define CreateGroup CreateGroupW
178 #define DeleteGroup DeleteGroupW
179 #define AddItem AddItemW
180 #define DeleteItem DeleteItemW
181 #define CopyProfileDirectory CopyProfileDirectoryW
182 /* end private */
183 #if (WINVER >= 0x0500)
184 #define DeleteProfile DeleteProfileW
185 #endif
186 #define LoadUserProfile LoadUserProfileW
187 #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW
188 #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryW
189 #define GetProfilesDirectory GetProfilesDirectoryW
190 #define GetUserProfileDirectory GetUserProfileDirectoryW
191 #if (WINVER >= 0x0500)
192 #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserW
193 #endif
194 #if (WINVER >= 0x0502)
195 typedef GROUP_POLICY_OBJECTW GROUP_POLICY_OBJECT;
196 typedef PGROUP_POLICY_OBJECTW PGROUP_POLICY_OBJECT;
197 #define GetAppliedGPOList GetAppliedGPOListW
198 #endif
199 #else
202 /* begin private */
203 #define CreateUserProfile CreateUserProfileA
204 #define CreateUserProfileEx CreateUserProfileExA
205 #define AddDesktopItem AddDesktopItemA
206 #define DeleteDesktopItem DeleteDesktopItemA
207 #define CreateGroup CreateGroupA
208 #define DeleteGroup DeleteGroupA
209 #define AddItem AddItemA
210 #define DeleteItem DeleteItemA
211 #define CopyProfileDirectory CopyProfileDirectoryA
212 /* end private */
213 #if (WINVER >= 0x0500)
214 #define DeleteProfile DeleteProfileA
215 #endif
216 #define LoadUserProfile LoadUserProfileA
217 #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA
218 #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryA
219 #define GetProfilesDirectory GetProfilesDirectoryA
220 #define GetUserProfileDirectory GetUserProfileDirectoryA
221 #if (WINVER >= 0x0500)
222 #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserA
223 #endif
224 #if (WINVER >= 0x0502)
225 typedef GROUP_POLICY_OBJECTA GROUP_POLICY_OBJECT;
226 typedef PGROUP_POLICY_OBJECTA PGROUP_POLICY_OBJECT;
227 #define GetAppliedGPOList GetAppliedGPOListA
228 #endif
229 #endif
230 
231 #ifdef __cplusplus
232 }
233 #endif
234 
235 #endif /* _USERENV_H */
BOOL WINAPI CreateGroupA(LPCSTR, BOOL)
Definition: desktop.c:436
DWORD dwOptions
Definition: solitaire.cpp:23
BOOL WINAPI LoadUserProfileW(HANDLE, LPPROFILEINFOW)
BOOL WINAPI CreateUserProfileExA(PSID, LPCSTR, LPCSTR, LPSTR, DWORD, BOOL)
BOOL WINAPI DestroyEnvironmentBlock(LPVOID)
BOOL WINAPI UnregisterGPNotification(HANDLE)
HANDLE hProfile
Definition: userenv.h:43
BOOL WINAPI LeaveCriticalPolicySection(HANDLE)
BOOL WINAPI DeleteGroupA(LPCSTR, BOOL)
Definition: desktop.c:494
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL WINAPI RegisterGPNotification(HANDLE, BOOL)
LPSTR lpDefaultPath
Definition: userenv.h:28
PSID WINAPI GetUserSid(HANDLE)
Definition: sid.c:36
LPPROFILEINFOA LPPROFILEINFO
Definition: userenv.h:201
BOOL WINAPI CopySystemProfile(ULONG)
LPSTR lpPolicyPath
Definition: userenv.h:30
char CHAR
Definition: xmlstorage.h:175
BOOL WINAPI InitializeProfiles(VOID)
Definition: setup.c:335
DWORD WINAPI GetAppliedGPOListA(_In_ DWORD dwFlags, _In_ LPCSTR pMachineName, _In_ PSID pSidUser, _In_ GUID *pGuidExtension, _Out_ PGROUP_POLICY_OBJECTA *ppGPOList)
Definition: gpolicy.c:578
PROFILEINFOA PROFILEINFO
Definition: userenv.h:200
BOOL WINAPI DeleteProfileA(_In_ LPCSTR lpSidString, _In_opt_ LPCSTR lpProfilePath, _In_opt_ LPCSTR lpComputerName)
Definition: profile.c:1131
BOOL WINAPI GetDefaultUserProfileDirectoryW(LPWSTR, LPDWORD)
BOOL WINAPI AddItemA(LPCSTR, BOOL, LPCSTR, LPCSTR, LPCSTR, INT, LPCSTR, WORD, INT)
Definition: desktop.c:552
char * LPSTR
Definition: xmlstorage.h:182
BOOL WINAPI GetProfilesDirectoryW(LPWSTR, LPDWORD)
BOOL WINAPI DeleteDesktopItemW(BOOL, LPCWSTR)
Definition: desktop.c:412
int32_t INT
Definition: typedefs.h:56
LPWSTR lpDefaultPath
Definition: userenv.h:40
LPSTR lpProfilePath
Definition: userenv.h:27
BOOL WINAPI GetProfilesDirectoryA(LPSTR, LPDWORD)
LPWSTR lpUserName
Definition: userenv.h:38
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI DeleteProfileW(_In_ LPCWSTR lpSidString, _In_opt_ LPCWSTR lpProfilePath, _In_opt_ LPCWSTR lpComputerName)
Definition: profile.c:1175
BOOL WINAPI DeleteGroupW(LPCWSTR, BOOL)
Definition: desktop.c:517
BOOL WINAPI AddDesktopItemW(BOOL, LPCWSTR, LPCWSTR, LPCWSTR, INT, LPCWSTR, WORD, INT)
Definition: desktop.c:233
BOOL WINAPI CreateUserProfileW(PSID, LPCWSTR)
BOOL WINAPI GetDefaultUserProfileDirectoryA(LPSTR, LPDWORD)
#define _Out_
Definition: no_sal2.h:323
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI ExpandEnvironmentStringsForUserA(IN HANDLE hToken, IN LPCSTR lpSrc, OUT LPSTR lpDest, IN DWORD dwSize)
Definition: environment.c:796
BOOL WINAPI CreateUserProfileA(PSID, LPCSTR)
const char * LPCSTR
Definition: xmlstorage.h:183
LPWSTR lpServerName
Definition: userenv.h:41
LPSTR lpUserName
Definition: userenv.h:26
BOOL WINAPI AddItemW(LPCWSTR, BOOL, LPCWSTR, LPCWSTR, LPCWSTR, INT, LPCWSTR, WORD, INT)
Definition: desktop.c:653
LPWSTR lpPolicyPath
Definition: userenv.h:42
BOOL WINAPI CopyProfileDirectoryW(LPCWSTR, LPCWSTR, DWORD)
Definition: directory.c:72
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI GetAllUsersProfileDirectoryA(LPSTR, LPDWORD)
BOOL WINAPI GetUserProfileDirectoryA(HANDLE, LPSTR, LPDWORD)
#define WINAPI
Definition: msvc.h:6
struct _PROFILEINFOA PROFILEINFOA
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _PROFILEINFOW * LPPROFILEINFOW
DWORD dwSize
Definition: userenv.h:36
BOOL WINAPI DeleteDesktopItemA(BOOL, LPCSTR)
Definition: desktop.c:388
DWORD dwFlags
Definition: userenv.h:37
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HANDLE hProfile
Definition: userenv.h:31
BOOL WINAPI CreateGroupW(LPCWSTR, BOOL)
Definition: desktop.c:459
struct _PROFILEINFOW PROFILEINFOW
BOOL WINAPI RefreshPolicy(BOOL)
#define _In_
Definition: no_sal2.h:204
LPWSTR lpProfilePath
Definition: userenv.h:39
BOOL WINAPI AddDesktopItemA(BOOL, LPCSTR, LPCSTR, LPCSTR, INT, LPCSTR, WORD, INT)
Definition: desktop.c:157
BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR, LPDWORD)
BOOL WINAPI GetProfileType(_Out_ PDWORD pdwFlags)
Definition: profile.c:1566
BOOL WINAPI DeleteItemW(LPCWSTR, BOOL, LPCWSTR, BOOL)
Definition: desktop.c:861
DWORD * PDWORD
Definition: pedump.c:68
DWORD WINAPI GetAppliedGPOListW(_In_ DWORD dwFlags, _In_ LPCWSTR pMachineName, _In_ PSID pSidUser, _In_ GUID *pGuidExtension, _Out_ PGROUP_POLICY_OBJECTW *ppGPOList)
Definition: gpolicy.c:592
DWORD dwSize
Definition: userenv.h:24
BOOL WINAPI UnloadUserProfile(HANDLE, HANDLE)
BOOL WINAPI ExpandEnvironmentStringsForUserW(IN HANDLE hToken, IN LPCWSTR lpSrc, OUT LPWSTR lpDest, IN DWORD dwSize)
Definition: environment.c:745
uint32_t * LPDWORD
Definition: typedefs.h:57
unsigned int ULONG
Definition: retypes.h:1
BOOL WINAPI DeleteItemA(LPCSTR, BOOL, LPCSTR, BOOL)
Definition: desktop.c:813
LPSTR lpServerName
Definition: userenv.h:29
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL WINAPI LoadUserProfileA(HANDLE, LPPROFILEINFOA)
BOOL WINAPI GetUserProfileDirectoryW(HANDLE, LPWSTR, LPDWORD)
BOOL WINAPI CreateUserProfileExW(PSID, LPCWSTR, LPCWSTR, LPWSTR, DWORD, BOOL)
_In_ LPCSTR _Out_writes_to_opt_ cchDisplayName LPSTR lpDisplayName
Definition: winbase.h:2747
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI CreateEnvironmentBlock(LPVOID *, HANDLE, BOOL)
BOOL WINAPI RefreshPolicyEx(IN BOOL bMachine, IN DWORD dwOptions)
Definition: gpolicy.c:448
BOOL WINAPI CopyProfileDirectoryA(LPCSTR, LPCSTR, DWORD)
Definition: directory.c:36
DWORD dwFlags
Definition: userenv.h:25
HANDLE WINAPI EnterCriticalPolicySection(BOOL)
struct _PROFILEINFOA * LPPROFILEINFOA