mirror of
https://github.com/reactos/reactos.git
synced 2024-12-12 04:43:48 +08:00
[SHELL32][SDK] Implement IsSuspendAllowed (#5831)
- Add IsShutdownAllowed helper function. - Add IsSuspendAllowed prototype to <undocshell.h>. - Implement IsSuspendAllowed function.
This commit is contained in:
parent
be8a6f8af1
commit
995f56d1d3
@ -783,17 +783,6 @@ DAD_DragEnterEx2(HWND hwndTarget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
EXTERN_C BOOL
|
||||
WINAPI
|
||||
IsSuspendAllowed(VOID)
|
||||
{
|
||||
FIXME("IsSuspendAllowed() stub\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
|
@ -164,6 +164,20 @@ Quit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL IsShutdownAllowed(VOID)
|
||||
{
|
||||
return SHTestTokenPrivilegeW(NULL, SE_SHUTDOWN_NAME);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* IsSuspendAllowed (SHELL32.53)
|
||||
*/
|
||||
BOOL WINAPI IsSuspendAllowed(VOID)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return IsShutdownAllowed() && IsPwrSuspendAllowed();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHGetShellStyleHInstance (SHELL32.749)
|
||||
*/
|
||||
|
@ -697,6 +697,7 @@ SHInvokePrivilegedFunctionW(
|
||||
|
||||
BOOL WINAPI
|
||||
SHTestTokenPrivilegeW(_In_opt_ HANDLE hToken, _In_z_ LPCWSTR lpName);
|
||||
BOOL WINAPI IsSuspendAllowed(VOID);
|
||||
|
||||
/*****************************************************************************
|
||||
* Shell32 resources
|
||||
|
Loading…
Reference in New Issue
Block a user