ReactOS 0.4.16-dev-125-g798ea90
userenv.h
Go to the documentation of this file.
1#ifndef _USERENV_H
2#define _USERENV_H
3
4#ifdef __cplusplus
5extern "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
22typedef struct _PROFILEINFOA
23{
33
34typedef struct _PROFILEINFOW
35{
45
46#if (WINVER >= 0x0502)
47typedef enum _GPO_LINK {
48 GPLinkUnknown = 0,
49 GPLinkMachine,
50 GPLinkSite,
51 GPLinkDomain,
52 GPLinkOrganizationalUnit
53} GPO_LINK, *PGPO_LINK;
54
55typedef struct _GROUP_POLICY_OBJECTA {
58 LPSTR lpDSPath;
59 LPSTR lpFileSysPath;
61 CHAR szGPOName[50];
62 GPO_LINK GPOLink;
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
71typedef struct _GROUP_POLICY_OBJECTW {
74 LPWSTR lpDSPath;
75 LPWSTR lpFileSysPath;
77 WCHAR szGPOName[50];
78 GPO_LINK GPOLink;
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)
140DWORD
141WINAPI
144 _In_ LPCSTR pMachineName,
145 _In_ PSID pSidUser,
146 _In_ GUID *pGuidExtension,
147 _Out_ PGROUP_POLICY_OBJECTA *ppGPOList
148);
149DWORD
150WINAPI
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
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)
195typedef GROUP_POLICY_OBJECTW GROUP_POLICY_OBJECT;
196typedef 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)
225typedef GROUP_POLICY_OBJECTA GROUP_POLICY_OBJECT;
226typedef 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 */
DWORD dwVersion
Definition: LocaleTests.cpp:63
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI ExpandEnvironmentStringsForUserW(IN HANDLE hToken, IN LPCWSTR lpSrc, OUT LPWSTR lpDest, IN DWORD dwSize)
Definition: environment.c:743
BOOL WINAPI ExpandEnvironmentStringsForUserA(IN HANDLE hToken, IN LPCSTR lpSrc, OUT LPSTR lpDest, IN DWORD dwSize)
Definition: environment.c:794
BOOL WINAPI DeleteProfileA(_In_ LPCSTR lpSidString, _In_opt_ LPCSTR lpProfilePath, _In_opt_ LPCSTR lpComputerName)
Definition: profile.c:1131
BOOL WINAPI DeleteProfileW(_In_ LPCWSTR lpSidString, _In_opt_ LPCWSTR lpProfilePath, _In_opt_ LPCWSTR lpComputerName)
Definition: profile.c:1175
BOOL WINAPI GetProfileType(_Out_ PDWORD pdwFlags)
Definition: profile.c:1649
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
DWORD WINAPI GetAppliedGPOListW(_In_ DWORD dwFlags, _In_ LPCWSTR pMachineName, _In_ PSID pSidUser, _In_ GUID *pGuidExtension, _Out_ PGROUP_POLICY_OBJECTW *ppGPOList)
Definition: gpolicy.c:592
BOOL WINAPI RefreshPolicyEx(IN BOOL bMachine, IN DWORD dwOptions)
Definition: gpolicy.c:448
DWORD WINAPI GetAppliedGPOListA(_In_ DWORD dwFlags, _In_ LPCSTR pMachineName, _In_ PSID pSidUser, _In_ GUID *pGuidExtension, _Out_ PGROUP_POLICY_OBJECTA *ppGPOList)
Definition: gpolicy.c:578
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
DWORD * PDWORD
Definition: pedump.c:68
DWORD dwOptions
Definition: solitaire.cpp:25
DWORD dwFlags
Definition: userenv.h:25
HANDLE hProfile
Definition: userenv.h:31
LPSTR lpDefaultPath
Definition: userenv.h:28
LPSTR lpPolicyPath
Definition: userenv.h:30
DWORD dwSize
Definition: userenv.h:24
LPSTR lpServerName
Definition: userenv.h:29
LPSTR lpUserName
Definition: userenv.h:26
LPSTR lpProfilePath
Definition: userenv.h:27
LPWSTR lpPolicyPath
Definition: userenv.h:42
LPWSTR lpServerName
Definition: userenv.h:41
LPWSTR lpProfilePath
Definition: userenv.h:39
DWORD dwFlags
Definition: userenv.h:37
DWORD dwSize
Definition: userenv.h:36
HANDLE hProfile
Definition: userenv.h:43
LPWSTR lpUserName
Definition: userenv.h:38
LPWSTR lpDefaultPath
Definition: userenv.h:40
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
BOOL WINAPI GetProfilesDirectoryW(LPWSTR, LPDWORD)
BOOL WINAPI DeleteDesktopItemA(BOOL, LPCSTR)
Definition: desktop.c:388
BOOL WINAPI LoadUserProfileA(HANDLE, LPPROFILEINFOA)
BOOL WINAPI CopySystemProfile(ULONG)
BOOL WINAPI AddDesktopItemA(BOOL, LPCSTR, LPCSTR, LPCSTR, INT, LPCSTR, WORD, INT)
Definition: desktop.c:157
struct _PROFILEINFOW * LPPROFILEINFOW
BOOL WINAPI LeaveCriticalPolicySection(HANDLE)
BOOL WINAPI DeleteGroupA(LPCSTR, BOOL)
Definition: desktop.c:494
BOOL WINAPI CreateUserProfileA(PSID, LPCSTR)
BOOL WINAPI CreateEnvironmentBlock(LPVOID *, HANDLE, BOOL)
BOOL WINAPI CreateGroupW(LPCWSTR, BOOL)
Definition: desktop.c:459
BOOL WINAPI DeleteGroupW(LPCWSTR, BOOL)
Definition: desktop.c:517
BOOL WINAPI UnloadUserProfile(HANDLE, HANDLE)
BOOL WINAPI GetDefaultUserProfileDirectoryA(LPSTR, LPDWORD)
struct _PROFILEINFOW PROFILEINFOW
BOOL WINAPI DeleteDesktopItemW(BOOL, LPCWSTR)
Definition: desktop.c:412
BOOL WINAPI UnregisterGPNotification(HANDLE)
BOOL WINAPI DeleteItemA(LPCSTR, BOOL, LPCSTR, BOOL)
Definition: desktop.c:813
BOOL WINAPI DeleteItemW(LPCWSTR, BOOL, LPCWSTR, BOOL)
Definition: desktop.c:861
BOOL WINAPI CreateUserProfileW(PSID, LPCWSTR)
BOOL WINAPI DestroyEnvironmentBlock(LPVOID)
BOOL WINAPI InitializeProfiles(VOID)
Definition: setup.c:335
BOOL WINAPI AddItemA(LPCSTR, BOOL, LPCSTR, LPCSTR, LPCSTR, INT, LPCSTR, WORD, INT)
Definition: desktop.c:552
BOOL WINAPI CopyProfileDirectoryW(LPCWSTR, LPCWSTR, DWORD)
Definition: directory.c:72
BOOL WINAPI GetProfilesDirectoryA(LPSTR, LPDWORD)
BOOL WINAPI AddDesktopItemW(BOOL, LPCWSTR, LPCWSTR, LPCWSTR, INT, LPCWSTR, WORD, INT)
Definition: desktop.c:233
PROFILEINFOA PROFILEINFO
Definition: userenv.h:200
BOOL WINAPI CreateUserProfileExA(PSID, LPCSTR, LPCSTR, LPSTR, DWORD, BOOL)
BOOL WINAPI GetAllUsersProfileDirectoryA(LPSTR, LPDWORD)
struct _PROFILEINFOA * LPPROFILEINFOA
BOOL WINAPI AddItemW(LPCWSTR, BOOL, LPCWSTR, LPCWSTR, LPCWSTR, INT, LPCWSTR, WORD, INT)
Definition: desktop.c:653
BOOL WINAPI GetUserProfileDirectoryW(HANDLE, LPWSTR, LPDWORD)
BOOL WINAPI LoadUserProfileW(HANDLE, LPPROFILEINFOW)
BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR, LPDWORD)
HANDLE WINAPI EnterCriticalPolicySection(BOOL)
BOOL WINAPI CreateGroupA(LPCSTR, BOOL)
Definition: desktop.c:436
BOOL WINAPI GetUserProfileDirectoryA(HANDLE, LPSTR, LPDWORD)
BOOL WINAPI RefreshPolicy(BOOL)
PSID WINAPI GetUserSid(HANDLE)
Definition: sid.c:36
LPPROFILEINFOA LPPROFILEINFO
Definition: userenv.h:201
BOOL WINAPI CreateUserProfileExW(PSID, LPCWSTR, LPCWSTR, LPWSTR, DWORD, BOOL)
BOOL WINAPI GetDefaultUserProfileDirectoryW(LPWSTR, LPDWORD)
BOOL WINAPI RegisterGPNotification(HANDLE, BOOL)
struct _PROFILEINFOA PROFILEINFOA
BOOL WINAPI CopyProfileDirectoryA(LPCSTR, LPCSTR, DWORD)
Definition: directory.c:36
_In_ LPCSTR _Out_writes_to_opt_ cchDisplayName LPSTR lpDisplayName
Definition: winbase.h:2790
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175