mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
implemented WaitForUserPolicyForegroundProcessing() and WaitForMachinePolicyForegroundProcessing()
svn path=/trunk/; revision=20813
This commit is contained in:
parent
94d809fd05
commit
eb9ce0f7b7
2 changed files with 44 additions and 0 deletions
|
@ -47,10 +47,12 @@ static const WCHAR szLocalGPApplied[] = L"userenv: User Group Policy has been ap
|
|||
static const WCHAR szLocalGPMutex[] = L"userenv: user policy mutex";
|
||||
static const WCHAR szLocalGPRefreshEvent[] = L"userenv: user policy refresh event";
|
||||
static const WCHAR szLocalGPForceRefreshEvent[] = L"userenv: user policy force refresh event";
|
||||
static const WCHAR szLocalGPDoneEvent[] = L"userenv: User Policy Foreground Done Event";
|
||||
static const WCHAR szMachineGPApplied[] = L"Global\\userenv: Machine Group Policy has been applied";
|
||||
static const WCHAR szMachineGPMutex[] = L"Global\\userenv: machine policy mutex";
|
||||
static const WCHAR szMachineGPRefreshEvent[] = L"Global\\userenv: machine policy refresh event";
|
||||
static const WCHAR szMachineGPForceRefreshEvent[] = L"Global\\userenv: machine policy force refresh event";
|
||||
static const WCHAR szMachineGPDoneEvent[] = L"Global\\userenv: Machine Policy Foreground Done Event";
|
||||
|
||||
static CRITICAL_SECTION GPNotifyLock;
|
||||
static PGP_NOTIFY NotificationList = NULL;
|
||||
|
@ -521,3 +523,43 @@ LeaveCriticalPolicySection(IN HANDLE hSection)
|
|||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI
|
||||
WaitForUserPolicyForegroundProcessing(VOID)
|
||||
{
|
||||
HANDLE hEvent;
|
||||
BOOL Ret = FALSE;
|
||||
|
||||
hEvent = OpenEventW(SYNCHRONIZE,
|
||||
FALSE,
|
||||
szLocalGPDoneEvent);
|
||||
if (hEvent != NULL)
|
||||
{
|
||||
Ret = WaitForSingleObject(hEvent,
|
||||
INFINITE) != WAIT_FAILED;
|
||||
CloseHandle(hEvent);
|
||||
}
|
||||
|
||||
/* return TRUE even if the mutex doesn't exist! */
|
||||
return Ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI
|
||||
WaitForMachinePolicyForegroundProcessing(VOID)
|
||||
{
|
||||
HANDLE hEvent;
|
||||
BOOL Ret = FALSE;
|
||||
|
||||
hEvent = OpenEventW(SYNCHRONIZE,
|
||||
FALSE,
|
||||
szMachineGPDoneEvent);
|
||||
if (hEvent != NULL)
|
||||
{
|
||||
Ret = WaitForSingleObject(hEvent,
|
||||
INFINITE) != WAIT_FAILED;
|
||||
CloseHandle(hEvent);
|
||||
}
|
||||
|
||||
/* return TRUE even if the mutex doesn't exist! */
|
||||
return Ret;
|
||||
}
|
||||
|
|
|
@ -38,4 +38,6 @@ RefreshPolicyEx@8
|
|||
RegisterGPNotification@8
|
||||
UnloadUserProfile@8
|
||||
UnregisterGPNotification@4
|
||||
WaitForUserPolicyForegroundProcessing@0
|
||||
WaitForMachinePolicyForegroundProcessing@0
|
||||
;EOF
|
||||
|
|
Loading…
Reference in a new issue