mirror of
https://github.com/reactos/reactos.git
synced 2024-07-05 12:15:46 +00:00
- Implement NtUserValidateHandleSecure and most support functions moved from static and added to their respected headers.
svn path=/trunk/; revision=29090
This commit is contained in:
parent
8d7c594692
commit
4ab750a26f
|
@ -18,5 +18,6 @@ CleanupAcceleratorImpl();
|
|||
|
||||
VOID
|
||||
RegisterThreadAcceleratorTable(struct _ETHREAD *Thread);
|
||||
PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL);
|
||||
|
||||
#endif /* _WIN32K_ACCELERATOR_H */
|
||||
|
|
|
@ -25,6 +25,7 @@ typedef struct tagHOOKTABLE
|
|||
|
||||
LRESULT FASTCALL co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam);
|
||||
VOID FASTCALL HOOK_DestroyThreadHooks(PETHREAD Thread);
|
||||
PHOOK FASTCALL IntGetHookObject(HHOOK);
|
||||
|
||||
#endif /* _WIN32K_HOOK_H */
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ NTSTATUS CleanupMonitorImpl();
|
|||
|
||||
NTSTATUS IntAttachMonitor(GDIDEVICE *pGdiDevice, ULONG DisplayNumber);
|
||||
NTSTATUS IntDetachMonitor(GDIDEVICE *pGdiDevice);
|
||||
PMONITOR_OBJECT FASTCALL UserGetMonitorObject(IN HMONITOR);
|
||||
|
||||
#endif /* _WIN32K_MONITOR_H */
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ CleanupAcceleratorImpl(VOID)
|
|||
}
|
||||
|
||||
|
||||
static
|
||||
PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hAccel)
|
||||
{
|
||||
PACCELERATOR_TABLE Accel;
|
||||
|
|
|
@ -120,7 +120,6 @@ IntDestroyMonitorObject(IN PMONITOR_OBJECT pMonitor)
|
|||
}
|
||||
|
||||
|
||||
static
|
||||
PMONITOR_OBJECT FASTCALL
|
||||
UserGetMonitorObject(IN HMONITOR hMonitor)
|
||||
{
|
||||
|
|
|
@ -637,17 +637,6 @@ NtUserUserHandleGrantAccess(
|
|||
return 0;
|
||||
}
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
NtUserValidateHandleSecure(
|
||||
HANDLE hHdl,
|
||||
BOOL Restricted)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
NtUserWaitForInputIdle(
|
||||
|
|
|
@ -4683,5 +4683,84 @@ IntShowOwnedPopups(PWINDOW_OBJECT OwnerWnd, BOOL fShow )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* NtUserValidateHandleSecure
|
||||
*
|
||||
* Status
|
||||
* @implemented
|
||||
*/
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
NtUserValidateHandleSecure(
|
||||
HANDLE handle,
|
||||
BOOL Restricted)
|
||||
{
|
||||
if(!Restricted)
|
||||
{
|
||||
UINT uType;
|
||||
{
|
||||
PUSER_HANDLE_ENTRY entry;
|
||||
if (!(entry = handle_to_entry(gHandleTable, handle )))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
uType = entry->type;
|
||||
}
|
||||
switch (uType)
|
||||
{
|
||||
case otWindow:
|
||||
{
|
||||
PWINDOW_OBJECT Window;
|
||||
if ((Window = UserGetWindowObject((HWND) handle))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
case otMenu:
|
||||
{
|
||||
PMENU_OBJECT Menu;
|
||||
if ((Menu = UserGetMenuObject((HMENU) handle))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
case otAccel:
|
||||
{
|
||||
PACCELERATOR_TABLE Accel;
|
||||
if ((Accel = UserGetAccelObject((HACCEL) handle))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
case otCursorIcon:
|
||||
{
|
||||
PCURICON_OBJECT Cursor;
|
||||
if ((Cursor = UserGetCurIconObject((HCURSOR) handle))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
case otHook:
|
||||
{
|
||||
PHOOK Hook;
|
||||
if ((Hook = IntGetHookObject((HHOOK) handle))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
case otMonitor:
|
||||
{
|
||||
PMONITOR_OBJECT Monitor;
|
||||
if ((Monitor = UserGetMonitorObject((HMONITOR) handle))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
case otCallProc:
|
||||
{
|
||||
WNDPROC_INFO Proc;
|
||||
return UserGetCallProcInfo( handle, &Proc );
|
||||
}
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ /* Is handle entry restricted? */
|
||||
UNIMPLEMENTED
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue