| userenv.h (6.1.7601.17514-Windows_7.0) | | userenv.h (6.3.9600.17415-Windows_8.1) |
| | |
| skipping to change at line 14 | | skipping to change at line 14 |
| // User Profiles, environment variables, and Group Policy | | // User Profiles, environment variables, and Group Policy |
| // | | // |
| // Copyright (c) Microsoft Corporation 1995-2002 | | // Copyright (c) Microsoft Corporation 1995-2002 |
| // All rights reserved | | // All rights reserved |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #ifndef _INC_USERENV | | #ifndef _INC_USERENV |
| #define _INC_USERENV | | #define _INC_USERENV |
| | |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
| #include <wbemcli.h> | | #include <wbemcli.h> |
| | |
| // | | // |
| // Define API decoration for direct importing of DLL references. | | // Define API decoration for direct importing of DLL references. |
| // | | // |
| | |
| #if !defined(_USERENV_) | | #if !defined(_USERENV_) |
| #define USERENVAPI DECLSPEC_IMPORT | | #define USERENVAPI DECLSPEC_IMPORT |
| #else | | #else |
| #define USERENVAPI | | #define USERENVAPI |
| | |
| skipping to change at line 67 | | skipping to change at line 72 |
| | |
| #include <profinfo.h> | | #include <profinfo.h> |
| | |
| #define PI_NOUI 0x00000001 // Prevents displaying of messages | | #define PI_NOUI 0x00000001 // Prevents displaying of messages |
| #define PI_APPLYPOLICY 0x00000002 // Apply NT4 style policy | | #define PI_APPLYPOLICY 0x00000002 // Apply NT4 style policy |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| LoadUserProfileA( | | LoadUserProfileA( |
|
| __in HANDLE hToken, | | _In_ HANDLE hToken, |
| __inout LPPROFILEINFOA lpProfileInfo); | | _Inout_ LPPROFILEINFOA lpProfileInfo); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| LoadUserProfileW( | | LoadUserProfileW( |
|
| __in HANDLE hToken, | | _In_ HANDLE hToken, |
| __inout LPPROFILEINFOW lpProfileInfo); | | _Inout_ LPPROFILEINFOW lpProfileInfo); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define LoadUserProfile LoadUserProfileW | | #define LoadUserProfile LoadUserProfileW |
| #else | | #else |
| #define LoadUserProfile LoadUserProfileA | | #define LoadUserProfile LoadUserProfileA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // UnloadUserProfile | | // UnloadUserProfile |
| // | | // |
| | |
| skipping to change at line 101 | | skipping to change at line 106 |
| // FALSE if not. Call GetLastError() for more details | | // FALSE if not. Call GetLastError() for more details |
| // | | // |
| // Note: The caller of this function must have admin privileges on the machi
ne. | | // Note: The caller of this function must have admin privileges on the machi
ne. |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| UnloadUserProfile( | | UnloadUserProfile( |
|
| __in HANDLE hToken, | | _In_ HANDLE hToken, |
| __in HANDLE hProfile); | | _In_ HANDLE hProfile); |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // GetProfilesDirectory | | // GetProfilesDirectory |
| // | | // |
| // Returns the path to the root of where all user profiles are stored. | | // Returns the path to the root of where all user profiles are stored. |
| // | | // |
| // lpProfilesDir - Receives the path | | // lpProfilesDir - Receives the path |
| // lpcchSize - Size of lpProfilesDir | | // lpcchSize - Size of lpProfilesDir |
| // | | // |
| | |
| skipping to change at line 127 | | skipping to change at line 132 |
| // and lpcchSize will contain the necessary buffer size. | | // and lpcchSize will contain the necessary buffer size. |
| // | | // |
| // Example return value: C:\Users | | // Example return value: C:\Users |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetProfilesDirectoryA( | | GetProfilesDirectoryA( |
|
| __out_ecount_opt(*lpcchSize) LPSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetProfilesDirectoryW( | | GetProfilesDirectoryW( |
|
| __out_ecount_opt(*lpcchSize) LPWSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPWSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetProfilesDirectory GetProfilesDirectoryW | | #define GetProfilesDirectory GetProfilesDirectoryW |
| #else | | #else |
| #define GetProfilesDirectory GetProfilesDirectoryA | | #define GetProfilesDirectory GetProfilesDirectoryA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // GetProfileType() | | // GetProfileType() |
| // | | // |
| | |
| skipping to change at line 164 | | skipping to change at line 169 |
| // (exists by default) | | // (exists by default) |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| // | | // |
| // Flags that can be set in the dwFlags field | | // Flags that can be set in the dwFlags field |
| // | | // |
| | |
|
| #define PT_TEMPORARY 0x00000001 // A profile has been allocated tha | | #define PT_TEMPORARY 0x00000001 // A profile has been alloc |
| t will be deleted at logoff. | | ated that will be deleted at logoff. |
| #define PT_ROAMING 0x00000002 // The loaded profile is a roaming | | #define PT_ROAMING 0x00000002 // The loaded profile is a |
| profile. | | roaming profile. |
| #define PT_MANDATORY 0x00000004 // The loaded profile is mandatory. | | #define PT_MANDATORY 0x00000004 // The loaded profile is ma |
| | ndatory. |
| | #define PT_ROAMING_PREEXISTING 0x00000008 // The loaded roaming profi |
| | le is not a brand new one - it was obtained from roamed location |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetProfileType( | | GetProfileType( |
|
| __out DWORD *dwFlags); | | _Out_ DWORD *dwFlags); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // DeleteProfile() | | // DeleteProfile() |
| // | | // |
| // Deletes the profile and all other user related settings from the machine | | // Deletes the profile and all other user related settings from the machine |
| // | | // |
| // lpSidString - String form of the user sid. | | // lpSidString - String form of the user sid. |
| | |
| skipping to change at line 198 | | skipping to change at line 204 |
| // | | // |
| // Comments: Deletes the profile directory, registry and appmgmt stuff | | // Comments: Deletes the profile directory, registry and appmgmt stuff |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| DeleteProfileA ( | | DeleteProfileA ( |
|
| __in LPCSTR lpSidString, | | _In_ LPCSTR lpSidString, |
| __in_opt LPCSTR lpProfilePath, | | _In_opt_ LPCSTR lpProfilePath, |
| __in_opt LPCSTR lpComputerName); | | _In_opt_ LPCSTR lpComputerName); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| DeleteProfileW ( | | DeleteProfileW ( |
|
| __in LPCWSTR lpSidString, | | _In_ LPCWSTR lpSidString, |
| __in_opt LPCWSTR lpProfilePath, | | _In_opt_ LPCWSTR lpProfilePath, |
| __in_opt LPCWSTR lpComputerName); | | _In_opt_ LPCWSTR lpComputerName); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define DeleteProfile DeleteProfileW | | #define DeleteProfile DeleteProfileW |
| #else | | #else |
| #define DeleteProfile DeleteProfileA | | #define DeleteProfile DeleteProfileA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| | |
| skipping to change at line 245 | | skipping to change at line 251 |
| // | | // |
| // Comments: | | // Comments: |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0600) | | #if(WINVER >= 0x0600) |
| | |
| USERENVAPI | | USERENVAPI |
| HRESULT | | HRESULT |
| WINAPI | | WINAPI |
| CreateProfile( | | CreateProfile( |
|
| __in LPCWSTR pszUserSid, | | _In_ LPCWSTR pszUserSid, |
| __in LPCWSTR pszUserName, | | _In_ LPCWSTR pszUserName, |
| __out_ecount(cchProfilePath) LPWSTR pszProfilePath, | | _Out_writes_(cchProfilePath) LPWSTR pszProfilePath, |
| __in DWORD cchProfilePath); | | _In_ DWORD cchProfilePath); |
| | |
| #endif /* WINVER >= 0x0600 */ | | #endif /* WINVER >= 0x0600 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // GetDefaultUserProfilesDirectory | | // GetDefaultUserProfilesDirectory |
| // | | // |
| // Returns the path to the root of the default user profile | | // Returns the path to the root of the default user profile |
| // | | // |
| // lpProfileDir - Receives the path | | // lpProfileDir - Receives the path |
| | |
| skipping to change at line 277 | | skipping to change at line 283 |
| // Example return value: C:\Users\Default | | // Example return value: C:\Users\Default |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDefaultUserProfileDirectoryA( | | GetDefaultUserProfileDirectoryA( |
|
| __out_ecount_opt(*lpcchSize) LPSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDefaultUserProfileDirectoryW( | | GetDefaultUserProfileDirectoryW( |
|
| __out_ecount_opt(*lpcchSize) LPWSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPWSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryW | | #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryW |
| #else | | #else |
| #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryA | | #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| | |
| skipping to change at line 318 | | skipping to change at line 324 |
| // Example return value: C:\Program Data | | // Example return value: C:\Program Data |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetAllUsersProfileDirectoryA( | | GetAllUsersProfileDirectoryA( |
|
| __out_ecount_opt(*lpcchSize) LPSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetAllUsersProfileDirectoryW( | | GetAllUsersProfileDirectoryW( |
|
| __out_ecount_opt(*lpcchSize) LPWSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPWSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW | | #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW |
| #else | | #else |
| #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA | | #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| | |
| skipping to change at line 358 | | skipping to change at line 364 |
| // and lpcchSize will contain the necessary buffer size. | | // and lpcchSize will contain the necessary buffer size. |
| // | | // |
| // Example return value: C:\Users\Joe | | // Example return value: C:\Users\Joe |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetUserProfileDirectoryA( | | GetUserProfileDirectoryA( |
|
| __in HANDLE hToken, | | _In_ HANDLE hToken, |
| __out_ecount_opt(*lpcchSize) LPSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetUserProfileDirectoryW( | | GetUserProfileDirectoryW( |
|
| __in HANDLE hToken, | | _In_ HANDLE hToken, |
| __out_ecount_opt(*lpcchSize) LPWSTR lpProfileDir, | | _Out_writes_opt_(*lpcchSize) LPWSTR lpProfileDir, |
| __inout LPDWORD lpcchSize); | | _Inout_ LPDWORD lpcchSize); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetUserProfileDirectory GetUserProfileDirectoryW | | #define GetUserProfileDirectory GetUserProfileDirectoryW |
| #else | | #else |
| #define GetUserProfileDirectory GetUserProfileDirectoryA | | #define GetUserProfileDirectory GetUserProfileDirectoryA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // CreateEnvironmentBlock | | // CreateEnvironmentBlock |
| // | | // |
| | |
| skipping to change at line 402 | | skipping to change at line 408 |
| // Call DestroyEnvironmentBlock to free the buffer when finished. | | // Call DestroyEnvironmentBlock to free the buffer when finished. |
| // | | // |
| // If this block is passed to CreateProcessAsUser, the | | // If this block is passed to CreateProcessAsUser, the |
| // CREATE_UNICODE_ENVIRONMENT flag must also be set. | | // CREATE_UNICODE_ENVIRONMENT flag must also be set. |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| CreateEnvironmentBlock( | | CreateEnvironmentBlock( |
|
| __out LPVOID *lpEnvironment, | | _At_((PZZWSTR *)lpEnvironment, _Outptr_) LPVOID *lpEnvironment, |
| __in_opt HANDLE hToken, | | _In_opt_ HANDLE hToken, |
| __in BOOL bInherit); | | _In_ BOOL bInherit); |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // DestroyEnvironmentBlock | | // DestroyEnvironmentBlock |
| // | | // |
| // Frees environment variables created by CreateEnvironmentBlock | | // Frees environment variables created by CreateEnvironmentBlock |
| // | | // |
| // lpEnvironment - A pointer to the environment block | | // lpEnvironment - A pointer to the environment block |
| // | | // |
| // Returns: TRUE if successful | | // Returns: TRUE if successful |
| // FALSE if not. Call GetLastError() for more details | | // FALSE if not. Call GetLastError() for more details |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| DestroyEnvironmentBlock( | | DestroyEnvironmentBlock( |
|
| __in LPVOID lpEnvironment); | | _In_ LPVOID lpEnvironment); |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // ExpandEnvironmentStringsForUser | | // ExpandEnvironmentStringsForUser |
| // | | // |
| // Expands the source string using the environment block for the | | // Expands the source string using the environment block for the |
| // specified user. If hToken is null, the system environment block | | // specified user. If hToken is null, the system environment block |
| // will be used (no user environment variables). | | // will be used (no user environment variables). |
| // | | // |
| // hToken - User's token returned from LogonUser() (optional, can be NU
LL) | | // hToken - User's token returned from LogonUser() (optional, can be NU
LL) |
| | |
| skipping to change at line 450 | | skipping to change at line 456 |
| // Note: If the user profile for hToken is not loaded, this api will fail. | | // Note: If the user profile for hToken is not loaded, this api will fail. |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| ExpandEnvironmentStringsForUserA( | | ExpandEnvironmentStringsForUserA( |
|
| __in_opt HANDLE hToken, | | _In_opt_ HANDLE hToken, |
| __in LPCSTR lpSrc, | | _In_ LPCSTR lpSrc, |
| __out_ecount(dwSize) LPSTR lpDest, | | _Out_writes_(dwSize) LPSTR lpDest, |
| __in DWORD dwSize); | | _In_ DWORD dwSize); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| ExpandEnvironmentStringsForUserW( | | ExpandEnvironmentStringsForUserW( |
|
| __in_opt HANDLE hToken, | | _In_opt_ HANDLE hToken, |
| __in LPCWSTR lpSrc, | | _In_ LPCWSTR lpSrc, |
| __out_ecount(dwSize) LPWSTR lpDest, | | _Out_writes_(dwSize) LPWSTR lpDest, |
| __in DWORD dwSize); | | _In_ DWORD dwSize); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserW | | #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserW |
| #else | | #else |
| #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserA | | #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| | |
| skipping to change at line 489 | | skipping to change at line 495 |
| // FALSE if not. Call GetLastError() for more details | | // FALSE if not. Call GetLastError() for more details |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| RefreshPolicy( | | RefreshPolicy( |
|
| __in BOOL bMachine); | | _In_ BOOL bMachine); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // RefreshPolicyEx() | | // RefreshPolicyEx() |
| // | | // |
| // Causes group policy to be applied immediately on the client machine. | | // Causes group policy to be applied immediately on the client machine. |
| // | | // |
| // bMachine - Refresh machine or user policy | | // bMachine - Refresh machine or user policy |
| | |
| skipping to change at line 516 | | skipping to change at line 522 |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| #define RP_FORCE 1 // Refresh policies without any optimisations
. | | #define RP_FORCE 1 // Refresh policies without any optimisations
. |
| #define RP_SYNC 2 // Refresh Policy sync; the call does not ret
urn till the time policy processing is completed | | #define RP_SYNC 2 // Refresh Policy sync; the call does not ret
urn till the time policy processing is completed |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| RefreshPolicyEx( | | RefreshPolicyEx( |
|
| __in BOOL bMachine, | | _In_ BOOL bMachine, |
| __in DWORD dwOptions); | | _In_ DWORD dwOptions); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // EnterCriticalPolicySection | | // EnterCriticalPolicySection |
| // | | // |
| // Pauses the background application of group policy to allow safe | | // Pauses the background application of group policy to allow safe |
| // reading of the registry. Applications that need to read multiple | | // reading of the registry. Applications that need to read multiple |
| // policy entries and ensure that the values are not changed while reading | | // policy entries and ensure that the values are not changed while reading |
| | |
| skipping to change at line 554 | | skipping to change at line 560 |
| // then acquire machine critical section. | | // then acquire machine critical section. |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| HANDLE | | HANDLE |
| WINAPI | | WINAPI |
| EnterCriticalPolicySection( | | EnterCriticalPolicySection( |
|
| __in BOOL bMachine); | | _In_ BOOL bMachine); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // LeaveCriticalPolicySection | | // LeaveCriticalPolicySection |
| // | | // |
| // Resumes the background application of group policy. See | | // Resumes the background application of group policy. See |
| // EnterCriticalPolicySection for more details. | | // EnterCriticalPolicySection for more details. |
| // | | // |
| | |
| skipping to change at line 580 | | skipping to change at line 586 |
| // Note: This function will close the handle. | | // Note: This function will close the handle. |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| LeaveCriticalPolicySection( | | LeaveCriticalPolicySection( |
|
| __in HANDLE hSection); | | _In_ HANDLE hSection); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // RegisterGPNotification | | // RegisterGPNotification |
| // | | // |
| // Entry point for registering for Group Policy change notification. | | // Entry point for registering for Group Policy change notification. |
| // | | // |
| // Parameters: hEvent - Event to be notified, by calling SetEvent(hEvent) | | // Parameters: hEvent - Event to be notified, by calling SetEvent(hEvent) |
| | |
| skipping to change at line 615 | | skipping to change at line 621 |
| // lParam - Points to the string "Policy" | | // lParam - Points to the string "Policy" |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| RegisterGPNotification( | | RegisterGPNotification( |
|
| __in HANDLE hEvent, | | _In_ HANDLE hEvent, |
| __in BOOL bMachine); | | _In_ BOOL bMachine); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // UnregisterGPNotification | | // UnregisterGPNotification |
| // | | // |
| // Removes registration for a Group Policy change notification. | | // Removes registration for a Group Policy change notification. |
| // | | // |
| // Parameters: hEvent - Event to be removed | | // Parameters: hEvent - Event to be removed |
| | |
| skipping to change at line 639 | | skipping to change at line 645 |
| // False if error occurs | | // False if error occurs |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| UnregisterGPNotification( | | UnregisterGPNotification( |
|
| __in HANDLE hEvent); | | _In_ HANDLE hEvent); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // GPOptions flags | | // GPOptions flags |
| // | | // |
| // These are the flags found in the GPOptions property of a DS object | | // These are the flags found in the GPOptions property of a DS object |
| // | | // |
| // For a given DS object (Site, Domain, OU), the GPOptions property | | // For a given DS object (Site, Domain, OU), the GPOptions property |
| | |
| skipping to change at line 826 | | skipping to change at line 832 |
| | |
| #define GPO_LIST_FLAG_MACHINE 0x00000001 // Return machine policy inform
ation | | #define GPO_LIST_FLAG_MACHINE 0x00000001 // Return machine policy inform
ation |
| #define GPO_LIST_FLAG_SITEONLY 0x00000002 // Return site policy informati
on only | | #define GPO_LIST_FLAG_SITEONLY 0x00000002 // Return site policy informati
on only |
| #define GPO_LIST_FLAG_NO_WMIFILTERS 0x00000004 // Ignore WMI filters when filt
ering GPO's | | #define GPO_LIST_FLAG_NO_WMIFILTERS 0x00000004 // Ignore WMI filters when filt
ering GPO's |
| #define GPO_LIST_FLAG_NO_SECURITYFILTERS 0x00000008 // Ignore security filters | | #define GPO_LIST_FLAG_NO_SECURITYFILTERS 0x00000008 // Ignore security filters |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetGPOListA ( | | GetGPOListA ( |
|
| __in_opt HANDLE hToken, | | _In_opt_ HANDLE hToken, |
| __in_opt LPCSTR lpName, | | _In_opt_ LPCSTR lpName, |
| __in_opt LPCSTR lpHostName, | | _In_opt_ LPCSTR lpHostName, |
| __in_opt LPCSTR lpComputerName, | | _In_opt_ LPCSTR lpComputerName, |
| __in DWORD dwFlags, | | _In_ DWORD dwFlags, |
| __deref_out PGROUP_POLICY_OBJECTA * pGPOList); | | _Outptr_ PGROUP_POLICY_OBJECTA * pGPOList); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetGPOListW ( | | GetGPOListW ( |
|
| __in_opt HANDLE hToken, | | _In_opt_ HANDLE hToken, |
| __in_opt LPCWSTR lpName, | | _In_opt_ LPCWSTR lpName, |
| __in_opt LPCWSTR lpHostName, | | _In_opt_ LPCWSTR lpHostName, |
| __in_opt LPCWSTR lpComputerName, | | _In_opt_ LPCWSTR lpComputerName, |
| __in DWORD dwFlags, | | _In_ DWORD dwFlags, |
| __deref_out PGROUP_POLICY_OBJECTW * pGPOList); | | _Outptr_ PGROUP_POLICY_OBJECTW * pGPOList); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetGPOList GetGPOListW | | #define GetGPOList GetGPOListW |
| #else | | #else |
| #define GetGPOList GetGPOListA | | #define GetGPOList GetGPOListA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| | |
| skipping to change at line 871 | | skipping to change at line 877 |
| // FALSE if not | | // FALSE if not |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| FreeGPOListA ( | | FreeGPOListA ( |
|
| __in PGROUP_POLICY_OBJECTA pGPOList); | | _In_ PGROUP_POLICY_OBJECTA pGPOList); |
| USERENVAPI | | USERENVAPI |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| FreeGPOListW ( | | FreeGPOListW ( |
|
| __in PGROUP_POLICY_OBJECTW pGPOList); | | _In_ PGROUP_POLICY_OBJECTW pGPOList); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define FreeGPOList FreeGPOListW | | #define FreeGPOList FreeGPOListW |
| #else | | #else |
| #define FreeGPOList FreeGPOListA | | #define FreeGPOList FreeGPOListA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| | |
| skipping to change at line 917 | | skipping to change at line 923 |
| // function completed successfully. Otherwise it indicates that the function fai
led. | | // function completed successfully. Otherwise it indicates that the function fai
led. |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetAppliedGPOListA ( | | GetAppliedGPOListA ( |
|
| __in DWORD dwFlags, | | _In_ DWORD dwFlags, |
| __in_opt LPCSTR pMachineName, | | _In_opt_ LPCSTR pMachineName, |
| __in_opt PSID pSidUser, | | _In_opt_ PSID pSidUser, |
| __in GUID *pGuidExtension, | | _In_ GUID *pGuidExtension, |
| __deref_out PGROUP_POLICY_OBJECTA *ppGPOList); | | _Outptr_ PGROUP_POLICY_OBJECTA *ppGPOList); |
| USERENVAPI | | USERENVAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| GetAppliedGPOListW ( | | GetAppliedGPOListW ( |
|
| __in DWORD dwFlags, | | _In_ DWORD dwFlags, |
| __in_opt LPCWSTR pMachineName, | | _In_opt_ LPCWSTR pMachineName, |
| __in_opt PSID pSidUser, | | _In_opt_ PSID pSidUser, |
| __in GUID *pGuidExtension, | | _In_ GUID *pGuidExtension, |
| __deref_out PGROUP_POLICY_OBJECTW *ppGPOList); | | _Outptr_ PGROUP_POLICY_OBJECTW *ppGPOList); |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define GetAppliedGPOList GetAppliedGPOListW | | #define GetAppliedGPOList GetAppliedGPOListW |
| #else | | #else |
| #define GetAppliedGPOList GetAppliedGPOListA | | #define GetAppliedGPOList GetAppliedGPOListA |
| #endif // !UNICODE | | #endif // !UNICODE |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| | |
| skipping to change at line 1014 | | skipping to change at line 1020 |
| #define GPO_INFO_FLAG_NOCHANGES 0x00000080 // No changes were detect
ed to the Group Policy Objects | | #define GPO_INFO_FLAG_NOCHANGES 0x00000080 // No changes were detect
ed to the Group Policy Objects |
| #define GPO_INFO_FLAG_LINKTRANSITION 0x00000100 // A change in link speed
was detected between previous policy | | #define GPO_INFO_FLAG_LINKTRANSITION 0x00000100 // A change in link speed
was detected between previous policy |
| // application and curren
t policy application | | // application and curren
t policy application |
| #define GPO_INFO_FLAG_LOGRSOP_TRANSITION 0x00000200 // A Change in Rsop Loggi
ng was detected between previous policy | | #define GPO_INFO_FLAG_LOGRSOP_TRANSITION 0x00000200 // A Change in Rsop Loggi
ng was detected between previous policy |
| // application and curren
t policy application, (new intf only) | | // application and curren
t policy application, (new intf only) |
| #define GPO_INFO_FLAG_FORCED_REFRESH 0x00000400 // Forced Refresh is bein
g applied. redo policies. | | #define GPO_INFO_FLAG_FORCED_REFRESH 0x00000400 // Forced Refresh is bein
g applied. redo policies. |
| #define GPO_INFO_FLAG_SAFEMODE_BOOT 0x00000800 // windows safe mode boot
flag | | #define GPO_INFO_FLAG_SAFEMODE_BOOT 0x00000800 // windows safe mode boot
flag |
| #define GPO_INFO_FLAG_ASYNC_FOREGROUND 0x00001000 // Asynchronous foregroun
d refresh of policy | | #define GPO_INFO_FLAG_ASYNC_FOREGROUND 0x00001000 // Asynchronous foregroun
d refresh of policy |
| | |
| typedef UINT_PTR ASYNCCOMPLETIONHANDLE; | | typedef UINT_PTR ASYNCCOMPLETIONHANDLE; |
|
| typedef DWORD (*PFNSTATUSMESSAGECALLBACK)(__in BOOL bVerbose, __in LPWSTR lpMess
age); | | typedef DWORD (*PFNSTATUSMESSAGECALLBACK)(_In_ BOOL bVerbose, _In_ LPWSTR lpMess
age); |
| | |
| typedef DWORD(*PFNPROCESSGROUPPOLICY)( | | typedef DWORD(*PFNPROCESSGROUPPOLICY)( |
|
| __in DWORD dwFlags, // GPO_INFO_FLAGS | | _In_ DWORD dwFlags, // GPO_INFO_FLAGS |
| __in HANDLE hToken, // User or machine token | | _In_ HANDLE hToken, // User or machine token |
| __in HKEY hKeyRoot, // Root of registry | | _In_ HKEY hKeyRoot, // Root of registry |
| __in PGROUP_POLICY_OBJECT pDeletedGPOList, // Linked list of deleted G | | _In_ PGROUP_POLICY_OBJECT pDeletedGPOList, // Linked list of deleted G |
| POs | | POs |
| __in PGROUP_POLICY_OBJECT pChangedGPOList, // Linked list of changed G | | _In_ PGROUP_POLICY_OBJECT pChangedGPOList, // Linked list of changed G |
| POs | | POs |
| __in ASYNCCOMPLETIONHANDLE pHandle, // For asynchronous complet | | _In_ ASYNCCOMPLETIONHANDLE pHandle, // For asynchronous complet |
| ion | | ion |
| __inout BOOL *pbAbort, // If true, then abort GPO | | _Inout_ BOOL *pbAbort, // If true, then abort GPO |
| processing | | processing |
| __in_opt PFNSTATUSMESSAGECALLBACK pStatusCallback); // Callback function fo | | _In_opt_ PFNSTATUSMESSAGECALLBACK pStatusCallback); // Callback function fo |
| r displaying status messages | | r displaying status messages |
| // Note, this can be NULL | | // Note, this can be NULL |
| | |
| typedef DWORD(*PFNPROCESSGROUPPOLICYEX)( | | typedef DWORD(*PFNPROCESSGROUPPOLICYEX)( |
|
| __in DWORD dwFlags, // GPO_INFO_FLAGS | | _In_ DWORD dwFlags, // GPO_INFO_FLAGS |
| __in HANDLE hToken, // User or machine token | | _In_ HANDLE hToken, // User or machine token |
| __in HKEY hKeyRoot, // Root of registry | | _In_ HKEY hKeyRoot, // Root of registry |
| __in PGROUP_POLICY_OBJECT pDeletedGPOList, // Linked list of deleted G | | _In_ PGROUP_POLICY_OBJECT pDeletedGPOList, // Linked list of deleted G |
| POs | | POs |
| __in PGROUP_POLICY_OBJECT pChangedGPOList, // Linked list of changed G | | _In_ PGROUP_POLICY_OBJECT pChangedGPOList, // Linked list of changed G |
| POs | | POs |
| __in ASYNCCOMPLETIONHANDLE pHandle, // For asynchronous complet | | _In_ ASYNCCOMPLETIONHANDLE pHandle, // For asynchronous complet |
| ion | | ion |
| __inout BOOL *pbAbort, // If true, then abort GPO | | _Inout_ BOOL *pbAbort, // If true, then abort GPO |
| processing | | processing |
| __in_opt PFNSTATUSMESSAGECALLBACK pStatusCallback, // Callback function fo | | _In_opt_ PFNSTATUSMESSAGECALLBACK pStatusCallback, // Callback function fo |
| r displaying status messages | | r displaying status messages |
| // Note, this can be NULL | | // Note, this can be NULL |
|
| __in_opt IWbemServices *pWbemServices, // Pointer to namespace to
log diagnostic mode data | | _In_opt_ IWbemServices *pWbemServices, // Pointer to namespace to
log diagnostic mode data |
| // Note, this will be NULL
when Rsop logging is disabled | | // Note, this will be NULL
when Rsop logging is disabled |
|
| __out HRESULT *pRsopStatus); // RSOP Logging succeeded o
r not. | | _Out_ HRESULT *pRsopStatus); // RSOP Logging succeeded o
r not. |
| | |
| typedef PVOID PRSOPTOKEN; | | typedef PVOID PRSOPTOKEN; |
| | |
| typedef struct _RSOP_TARGET { | | typedef struct _RSOP_TARGET { |
| WCHAR * pwszAccountName; // Account name | | WCHAR * pwszAccountName; // Account name |
| WCHAR * pwszNewSOM; // New domain or OU location
for account | | WCHAR * pwszNewSOM; // New domain or OU location
for account |
| SAFEARRAY * psaSecurityGroups; // New security groups | | SAFEARRAY * psaSecurityGroups; // New security groups |
| PRSOPTOKEN pRsopToken; // Rsop token for use with Rs
op security Api's | | PRSOPTOKEN pRsopToken; // Rsop token for use with Rs
op security Api's |
| PGROUP_POLICY_OBJECT pGPOList; // Linked list of GPOs | | PGROUP_POLICY_OBJECT pGPOList; // Linked list of GPOs |
| IWbemServices * pWbemServices; // Pointer to namespace to lo
g planning mode data | | IWbemServices * pWbemServices; // Pointer to namespace to lo
g planning mode data |
| } RSOP_TARGET, *PRSOP_TARGET; | | } RSOP_TARGET, *PRSOP_TARGET; |
| | |
| typedef DWORD(*PFNGENERATEGROUPPOLICY)( | | typedef DWORD(*PFNGENERATEGROUPPOLICY)( |
|
| __in DWORD dwFlags, // GPO_INFO_FLAGS | | _In_ DWORD dwFlags, // GPO_INFO_FLAGS |
| __inout BOOL *pbAbort, // If true, then abort GPO pr | | _Inout_ BOOL *pbAbort, // If true, then abort GPO pr |
| ocessing | | ocessing |
| __in_opt WCHAR *pwszSite, // Site the target computer i | | _In_opt_ WCHAR *pwszSite, // Site the target computer i |
| s in | | s in |
| __in_opt PRSOP_TARGET pComputerTarget, // Computer target info, can | | _In_opt_ PRSOP_TARGET pComputerTarget, // Computer target info, can |
| be null | | be null |
| __in_opt PRSOP_TARGET pUserTarget ); // User target info, can be n | | _In_opt_ PRSOP_TARGET pUserTarget ); // User target info, can be n |
| ull | | ull |
| | |
| // | | // |
| // GUID that identifies the registry extension | | // GUID that identifies the registry extension |
| // | | // |
| | |
| #define REGISTRY_EXTENSION_GUID { 0x35378EAC, 0x683F, 0x11D2, 0xA8, 0x9A, 0x00,
0xC0, 0x4F, 0xBB, 0xCF, 0xA2 } | | #define REGISTRY_EXTENSION_GUID { 0x35378EAC, 0x683F, 0x11D2, 0xA8, 0x9A, 0x00,
0xC0, 0x4F, 0xBB, 0xCF, 0xA2 } |
| | |
| // | | // |
| // UBPM trigger provider and event GUIDs | | // UBPM trigger provider and event GUIDs |
| // | | // |
| | |
| skipping to change at line 1096 | | skipping to change at line 1102 |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| typedef GUID *REFGPEXTENSIONID; | | typedef GUID *REFGPEXTENSIONID; |
| | |
| USERENVAPI | | USERENVAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| ProcessGroupPolicyCompleted( | | ProcessGroupPolicyCompleted( |
|
| __in REFGPEXTENSIONID extensionId, | | _In_ REFGPEXTENSIONID extensionId, |
| __in ASYNCCOMPLETIONHANDLE pAsyncHandle, | | _In_ ASYNCCOMPLETIONHANDLE pAsyncHandle, |
| __in DWORD dwStatus); | | _In_ DWORD dwStatus); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // Group Policy Object client side asynchronous extension processing | | // Group Policy Object client side asynchronous extension processing |
| // | | // |
| // extensionId - Unique guid identifying the extension | | // extensionId - Unique guid identifying the extension |
| // pAsyncHandle - Asynchronous completion handle that was passed to extension
in | | // pAsyncHandle - Asynchronous completion handle that was passed to extension
in |
| // ProcessGroupPolicy call | | // ProcessGroupPolicy call |
| | |
| skipping to change at line 1123 | | skipping to change at line 1129 |
| // function completed successfully. Otherwise it indicates that the function fai
led. | | // function completed successfully. Otherwise it indicates that the function fai
led. |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| ProcessGroupPolicyCompletedEx( | | ProcessGroupPolicyCompletedEx( |
|
| __in REFGPEXTENSIONID extensionId, | | _In_ REFGPEXTENSIONID extensionId, |
| __in ASYNCCOMPLETIONHANDLE pAsyncHandle, | | _In_ ASYNCCOMPLETIONHANDLE pAsyncHandle, |
| __in DWORD dwStatus, | | _In_ DWORD dwStatus, |
| __in HRESULT RsopStatus); | | _In_ HRESULT RsopStatus); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // Function: RsopAccessCheckByType | | // Function: RsopAccessCheckByType |
| // | | // |
| // Description: Determines whether the security descriptor pointed to by pSecuri
tyDescriptor | | // Description: Determines whether the security descriptor pointed to by pSecuri
tyDescriptor |
| // grants the set of access rights specified in dwD
esiredAccessMask | | // grants the set of access rights specified in dwD
esiredAccessMask |
| // to the client identified by the RSOPTOKEN pointe
d to by pRsopToken. | | // to the client identified by the RSOPTOKEN pointe
d to by pRsopToken. |
| | |
| skipping to change at line 1165 | | skipping to change at line 1171 |
| // Returns S_OK on success or appropriate error code. | | // Returns S_OK on success or appropriate error code. |
| // For additional details, look at the documentation of AccessCheckByType | | // For additional details, look at the documentation of AccessCheckByType |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| HRESULT | | HRESULT |
| WINAPI | | WINAPI |
| RsopAccessCheckByType( | | RsopAccessCheckByType( |
|
| __in PSECURITY_DESCRIPTOR pSecurityDescriptor, | | _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor, |
| __in_opt PSID pPrincipalSelfSid, | | _In_opt_ PSID pPrincipalSelfSid, |
| __in PRSOPTOKEN pRsopToken, | | _In_ PRSOPTOKEN pRsopToken, |
| __in DWORD dwDesiredAccessMask, | | _In_ DWORD dwDesiredAccessMask, |
| __in_ecount_opt(ObjectTypeListLength) POBJECT_TYPE_LIST pObjectTypeList, | | _In_reads_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST pObjectTypeList, |
| __in DWORD ObjectTypeListLength, | | _In_ DWORD ObjectTypeListLength, |
| __in PGENERIC_MAPPING pGenericMapping, | | _In_ PGENERIC_MAPPING pGenericMapping, |
| __in_bcount_opt(*pdwPrivilegeSetLength) PPRIVILEGE_SET pPrivilegeSet, | | _In_reads_bytes_opt_(*pdwPrivilegeSetLength) PPRIVILEGE_SET pPrivilegeSet, |
| __in_opt LPDWORD pdwPrivilegeSetLength, | | _In_opt_ LPDWORD pdwPrivilegeSetLength, |
| __out LPDWORD pdwGrantedAccessMask, | | _Out_ LPDWORD pdwGrantedAccessMask, |
| __out LPBOOL pbAccessStatus); | | _Out_ LPBOOL pbAccessStatus); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // Function: RsopFileAccessCheck | | // Function: RsopFileAccessCheck |
| // | | // |
| // Description: Determines whether the security descriptor on the file grants th
e set of file access | | // Description: Determines whether the security descriptor on the file grants th
e set of file access |
| // rights specified in dwDesiredAccessMask | | // rights specified in dwDesiredAccessMask |
| // to the client identified by the RSOPTOKEN pointe
d to by pRsopToken. | | // to the client identified by the RSOPTOKEN pointe
d to by pRsopToken. |
| | |
| skipping to change at line 1207 | | skipping to change at line 1213 |
| // | | // |
| // Returns S_OK on success or appropriate error code | | // Returns S_OK on success or appropriate error code |
| //============================================================================= | | //============================================================================= |
| | |
| #if(WINVER >= 0x0500) | | #if(WINVER >= 0x0500) |
| | |
| USERENVAPI | | USERENVAPI |
| HRESULT | | HRESULT |
| WINAPI | | WINAPI |
| RsopFileAccessCheck( | | RsopFileAccessCheck( |
|
| __in LPWSTR pszFileName, | | _In_ LPWSTR pszFileName, |
| __in PRSOPTOKEN pRsopToken, | | _In_ PRSOPTOKEN pRsopToken, |
| __in DWORD dwDesiredAccessMask, | | _In_ DWORD dwDesiredAccessMask, |
| __out LPDWORD pdwGrantedAccessMask, | | _Out_ LPDWORD pdwGrantedAccessMask, |
| __out LPBOOL pbAccessStatus); | | _Out_ LPBOOL pbAccessStatus); |
| | |
| #endif /* WINVER >= 0x0500 */ | | #endif /* WINVER >= 0x0500 */ |
| | |
| typedef enum _SETTINGSTATUS | | typedef enum _SETTINGSTATUS |
| { | | { |
| RSOPUnspecified = 0, | | RSOPUnspecified = 0, |
| RSOPApplied, | | RSOPApplied, |
| RSOPIgnored, | | RSOPIgnored, |
| RSOPFailed, | | RSOPFailed, |
| RSOPSubsettingFailed | | RSOPSubsettingFailed |
| | |
| skipping to change at line 1270 | | skipping to change at line 1276 |
| // nInfo - number of PolicySettingStatusInfo | | // nInfo - number of PolicySettingStatusInfo |
| // pStatus - array of PolicySettingStatusInfo | | // pStatus - array of PolicySettingStatusInfo |
| // | | // |
| // Return: S_OK if successful, HRESULT otherwise | | // Return: S_OK if successful, HRESULT otherwise |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| USERENVAPI | | USERENVAPI |
| HRESULT | | HRESULT |
| WINAPI | | WINAPI |
|
| RsopSetPolicySettingStatus( __in DWORD dwFlags, | | RsopSetPolicySettingStatus( _In_ DWORD dwFlags, |
| __in IWbemServices* pServices, | | _In_ IWbemServices* pServices, |
| __in IWbemClassObject* pSettingInstance, | | _In_ IWbemClassObject* pSettingInstance, |
| __in DWORD nInfo, | | _In_ DWORD nInfo, |
| __in_ecount(nInfo) POLICYSETTINGSTATUSINFO* pStat | | _In_reads_(nInfo) POLICYSETTINGSTATUSINFO* pStatu |
| us ); | | s ); |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // RsopResetPolicySettingStatus | | // RsopResetPolicySettingStatus |
| // | | // |
| // Unlinks RSOP_PolicySettingStatus from RSOP_PolicySetting, | | // Unlinks RSOP_PolicySettingStatus from RSOP_PolicySetting, |
| // deletes the instance of RSOP_PolicySettingStatus and RSOP_PolicySettingLink | | // deletes the instance of RSOP_PolicySettingStatus and RSOP_PolicySettingLink |
| // and optionally deletes the instance of RSOP_PolicySetting | | // and optionally deletes the instance of RSOP_PolicySetting |
| // | | // |
| // dwFlags - flags | | // dwFlags - flags |
| // pServices - RSOP namespace | | // pServices - RSOP namespace |
| // pSettingInstance - instance of RSOP_PolicySetting or its children | | // pSettingInstance - instance of RSOP_PolicySetting or its children |
| // | | // |
| // Return: S_OK if successful, HRESULT otherwise | | // Return: S_OK if successful, HRESULT otherwise |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| USERENVAPI | | USERENVAPI |
| HRESULT | | HRESULT |
| WINAPI | | WINAPI |
|
| RsopResetPolicySettingStatus( __in DWORD dwFlags, | | RsopResetPolicySettingStatus( _In_ DWORD dwFlags, |
| __in IWbemServices* pServices, | | _In_ IWbemServices* pServices, |
| __in IWbemClassObject* pSettingInstance ); | | _In_ IWbemClassObject* pSettingInstance ); |
| | |
| //============================================================================= | | //============================================================================= |
| // | | // |
| // Flags for RSoP WMI providers | | // Flags for RSoP WMI providers |
| // | | // |
| //============================================================================= | | //============================================================================= |
| | |
| // planning mode provider flags | | // planning mode provider flags |
| #define FLAG_NO_GPO_FILTER 0x80000000 // GPOs are not filtered, implies FL
AG_NO_CSE_INVOKE | | #define FLAG_NO_GPO_FILTER 0x80000000 // GPOs are not filtered, implies FL
AG_NO_CSE_INVOKE |
| #define FLAG_NO_CSE_INVOKE 0x40000000 // only GP processing done for plann
ing mode | | #define FLAG_NO_CSE_INVOKE 0x40000000 // only GP processing done for plann
ing mode |
| | |
| skipping to change at line 1341 | | skipping to change at line 1347 |
| // User accessing the rsop provider doesn't have access to user data. | | // User accessing the rsop provider doesn't have access to user data. |
| #define RSOP_USER_ACCESS_DENIED 0x00000001 | | #define RSOP_USER_ACCESS_DENIED 0x00000001 |
| | |
| // User accessing the rsop provider doesn't have access to computer data. | | // User accessing the rsop provider doesn't have access to computer data. |
| #define RSOP_COMPUTER_ACCESS_DENIED 0x00000002 | | #define RSOP_COMPUTER_ACCESS_DENIED 0x00000002 |
| | |
| // This user is an interactive non admin user, the temp snapshot namespace alrea
dy exists | | // This user is an interactive non admin user, the temp snapshot namespace alrea
dy exists |
| // and the FLAG_FORCE_CREATENAMESPACE was not passed in | | // and the FLAG_FORCE_CREATENAMESPACE was not passed in |
| #define RSOP_TEMPNAMESPACE_EXISTS 0x00000004 | | #define RSOP_TEMPNAMESPACE_EXISTS 0x00000004 |
| | |
|
| | // Plan is to support GenerateGPNotification on Windows Vista/ Win2k8 server and |
| | above |
| | |
| | #if(WINVER >= 0x0600) |
| | |
| | USERENVAPI |
| | DWORD |
| | WINAPI |
| | GenerateGPNotification ( |
| | _In_ BOOL bMachine, |
| | _In_ LPCWSTR lpwszMgmtProduct, |
| | _In_ DWORD dwMgmtProductOptions); |
| | |
| | #endif /* WINVER >= 0x0600 */ |
| | |
| | //============================================================================= |
| | // |
| | // CreateAppContainerProfile() |
| | // |
| | // Creates an AppContainer Profile |
| | // |
| | // pszAppContainerName - Name identifying the AppContainer profile. |
| | // pszDisplayName - Display name of the AppContainer profile. |
| | // pszDescription - Description of the AppContainer profile. |
| | // pCapabilities - Capabilities of the AppContainer. |
| | // dwCapabilityCount - Number of capabilities. |
| | // ppSidAppContainerSid - SID of the AppContainer. Must be freed using FreeSi |
| | d. |
| | // |
| | // Return: S_OK : Successfully created the profile |
| | // E_ACCESSDENIED : The caller does not have enough permission to |
| | // create the profile. |
| | // HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS) : A profile already exi |
| | sts |
| | // for the AppContainer. |
| | // Others : Standard HRESULT error codes. |
| | // |
| | // Comments: |
| | //============================================================================= |
| | |
| | #if(WINVER >= 0x0602) |
| | |
| | USERENVAPI |
| | HRESULT |
| | WINAPI |
| | CreateAppContainerProfile( |
| | _In_ PCWSTR pszAppContainerName, |
| | _In_ PCWSTR pszDisplayName, |
| | _In_ PCWSTR pszDescription, |
| | _In_reads_opt_(dwCapabilityCount) PSID_AND_ATTRIBUTES pCapabilities, |
| | _In_ DWORD dwCapabilityCount, |
| | _Outptr_ PSID* ppSidAppContainerSid); |
| | |
| | #endif /* WINVER >= 0x0602 */ |
| | |
| | //============================================================================= |
| | // |
| | // DeleteAppContainerProfile() |
| | // |
| | // Deletes an AppContainer Profile |
| | // |
| | // pszAppContainerName - Name identifying the AppContainer profile |
| | // to be deleted. |
| | // |
| | // Return: S_OK : Successfully created the profile |
| | // E_INVALIDARG : The specified profile does not exist. |
| | // Others : Standard HRESULT error codes. |
| | // |
| | // Comments: |
| | //============================================================================= |
| | |
| | #if(WINVER >= 0x0602) |
| | |
| | USERENVAPI |
| | HRESULT |
| | WINAPI |
| | DeleteAppContainerProfile( |
| | _In_ PCWSTR pszAppContainerName); |
| | |
| | #endif /* WINVER >= 0x0602 */ |
| | |
| | //============================================================================= |
| | // |
| | // GetAppContainerRegistryLocation() |
| | // |
| | // Gets the registry location associated with an AppContainer. Must be called |
| | // from within the context of the AppContainer. |
| | // |
| | // desiredAccess - Desired registry access. |
| | // phAppContainerKey - Registry key of the AppContainer registry location. |
| | // |
| | // Return: S_OK : Successfully created the profile |
| | // E_INVALIDARG : The caller is not running in or impersonating |
| | // an AppContainer. |
| | // Others : Standard HRESULT error codes. |
| | // |
| | // Comments: |
| | //============================================================================= |
| | |
| | #if(WINVER >= 0x0602) |
| | |
| | USERENVAPI |
| | HRESULT |
| | WINAPI |
| | GetAppContainerRegistryLocation( |
| | _In_ REGSAM desiredAccess, |
| | _Outptr_ PHKEY phAppContainerKey); |
| | |
| | #endif /* WINVER >= 0x0602 */ |
| | |
| | //============================================================================= |
| | // |
| | // GetAppContainerFolderPath() |
| | // |
| | // Retrieves the local app data folder for the specified AppContainer. |
| | // If a thread token is set, that user is used to determine the AppContainer. O |
| | therwise, |
| | // the process identity is used. |
| | // |
| | // pszAppContainerSid - String SID identifying the AppContainer. |
| | // ppszPath - Folder location. Must be freed with CoTaskMemFree. |
| | // |
| | // Return: S_OK : Successfully created the profile |
| | // E_INVALIDARG : NULL SID was provided. |
| | // Others : Standard HRESULT error codes. |
| | // |
| | // Comments: |
| | //============================================================================= |
| | |
| | #if(WINVER >= 0x0602) |
| | |
| | USERENVAPI |
| | HRESULT |
| | WINAPI |
| | GetAppContainerFolderPath( |
| | _In_ PCWSTR pszAppContainerSid, |
| | _Outptr_ PWSTR *ppszPath); |
| | |
| | #endif /* WINVER >= 0x0602 */ |
| | |
| | //============================================================================= |
| | // |
| | // DeriveAppContainerSidFromAppContainerName() |
| | // |
| | // Derives the SID of an AppContainer from its name. |
| | // |
| | // pszAppContainerName - Name from which the SID is derived. |
| | // ppsidAppContainerSid - Derived SID. Must be freed using FreeSid. |
| | // |
| | // Return: S_OK : Successfully created the profile |
| | // E_INVALIDARG : NULL or invalid name was provided. |
| | // Others : Standard HRESULT error codes. |
| | // |
| | // Comments: |
| | //============================================================================= |
| | |
| | #if(WINVER >= 0x0602) |
| | |
| | USERENVAPI |
| | HRESULT |
| | WINAPI |
| | DeriveAppContainerSidFromAppContainerName( |
| | _In_ PCWSTR pszAppContainerName, |
| | _Outptr_ PSID *ppsidAppContainerSid); |
| | |
| | #endif /* WINVER >= 0x0602 */ |
| | |
| #ifdef __cplusplus | | #ifdef __cplusplus |
| } | | } |
| #endif | | #endif |
| | |
|
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
| #endif // _INC_USERENV | | #endif // _INC_USERENV |
| | |
| End of changes. 47 change blocks. |
| 154 lines changed or deleted | | 332 lines changed or added |
|