mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[EXPLORER] Implement ShowUndockMenuItem (#9068)
Follow-up of #9036. ShowUndockMenuItem function will detect system undocking ability. JIRA issue: CORE-10675 - Do #include <cfgmgr32.h> in startmnusite.cpp. - Implement ShowUndockMenuItem by using setupapi!CM_Is_Dock_Station_Present function.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include <cfgmgr32.h>
|
||||
|
||||
class CStartMenuSite :
|
||||
public CComCoClass<CStartMenuSite>,
|
||||
@@ -99,12 +100,15 @@ public:
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
virtual BOOL
|
||||
ShowUndockMenuItem(VOID)
|
||||
virtual BOOL ShowUndockMenuItem(VOID)
|
||||
{
|
||||
TRACE("ShowUndockMenuItem() not implemented!\n");
|
||||
/* FIXME: How do we detect this?! */
|
||||
return FALSE;
|
||||
BOOL bPresent;
|
||||
CM_Is_Dock_Station_Present(&bPresent);
|
||||
|
||||
return bPresent &&
|
||||
!SHRestricted(REST_NOSMEJECTPC) &&
|
||||
SHTestTokenPrivilegeW(NULL, L"SeUndockPrivilege") &&
|
||||
!GetSystemMetrics(SM_REMOTESESSION);
|
||||
}
|
||||
|
||||
virtual BOOL
|
||||
|
||||
Reference in New Issue
Block a user