mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
implement DxEngLockShareSem
implement DxEngUnlockShareSem svn path=/trunk/; revision=31554
This commit is contained in:
parent
e71f4394b7
commit
57cfafda1d
2 changed files with 59 additions and 21 deletions
|
@ -78,13 +78,15 @@ BOOL DxEngUnlockDC(PDC pDC);
|
||||||
/* Notes : Set Gamma ramp */
|
/* Notes : Set Gamma ramp */
|
||||||
BOOL DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Unuse);
|
BOOL DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Unuse);
|
||||||
|
|
||||||
/* prototypes are not done yet, I need gather all my notes
|
BOOLEAN DxEngLockShareSem();
|
||||||
* to make them correct
|
BOOLEAN DxEngUnlockShareSem();
|
||||||
|
|
||||||
|
/* prototypes are not done yet, I need gather all my notes
|
||||||
|
* to make them correct
|
||||||
*/
|
*/
|
||||||
DWORD DxEngCreateMemoryDC(DWORD x1);
|
DWORD DxEngCreateMemoryDC(DWORD x1);
|
||||||
DWORD DxEngScreenAccessCheck();
|
DWORD DxEngScreenAccessCheck();
|
||||||
DWORD DxEngLockShareSem();
|
|
||||||
DWORD DxEngUnlockShareSem();
|
|
||||||
DWORD DxEngLockHdev(DWORD x1);
|
DWORD DxEngLockHdev(DWORD x1);
|
||||||
DWORD DxEngUnlockHdev(DWORD x1);
|
DWORD DxEngUnlockHdev(DWORD x1);
|
||||||
DWORD DxEngReferenceHdev(DWORD x1);
|
DWORD DxEngReferenceHdev(DWORD x1);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include <w32k.h>
|
#include <w32k.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
ERESOURCE ghsemShareDevLock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,22 +215,57 @@ DWORD DxEngScreenAccessCheck()
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/*++
|
||||||
/* DxEngLockShareSem */
|
* @name DxEngLockShareSem
|
||||||
/************************************************************************/
|
* @implemented
|
||||||
DWORD DxEngLockShareSem()
|
*
|
||||||
|
* The function DxEngLockShareSem doing share lock of ghsemShareDevLock
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* This function returns TRUE for susssess, or FALSE for fail, FALSE can only
|
||||||
|
* mean it being already lock.
|
||||||
|
*
|
||||||
|
* @remarks.
|
||||||
|
* it being use in diffent ntuser* functions and ntgdi*
|
||||||
|
* ReactOS specify it is not been inuse at moment
|
||||||
|
*SystemResourcesList
|
||||||
|
*--*/
|
||||||
|
BOOLEAN
|
||||||
|
DxEngLockShareSem()
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
BOOLEAN retVal = 0;
|
||||||
return FALSE;
|
|
||||||
|
if (ExIsResourceAcquiredExclusiveLite(&ghsemShareDevLock) == FALSE)
|
||||||
|
{
|
||||||
|
KeEnterCriticalRegion();
|
||||||
|
retVal = ExAcquireResourceExclusiveLite(&ghsemShareDevLock, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/*++
|
||||||
/* DxEngUnlockShareSem */
|
* @name DxEngUnlockShareSem
|
||||||
/************************************************************************/
|
* @implemented
|
||||||
DWORD DxEngUnlockShareSem()
|
*
|
||||||
|
* The function DxEngUnlockShareSem doing share unlock of ghsemShareDevLock
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* This function returns TRUE no matter what
|
||||||
|
*
|
||||||
|
* @remarks.
|
||||||
|
* ReactOS specify it is not been inuse at moment
|
||||||
|
*
|
||||||
|
*--*/
|
||||||
|
BOOLEAN
|
||||||
|
DxEngUnlockShareSem()
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
if (ExIsResourceAcquiredExclusiveLite(&ghsemShareDevLock) == TRUE)
|
||||||
return FALSE;
|
{
|
||||||
|
ExReleaseResourceLite(&ghsemShareDevLock);
|
||||||
|
KeLeaveCriticalRegion();
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
@ -415,9 +451,9 @@ DWORD DxEngSetDCState(DWORD x1, DWORD x2, DWORD x3)
|
||||||
* The DC handle
|
* The DC handle
|
||||||
*
|
*
|
||||||
* @param DWORD type
|
* @param DWORD type
|
||||||
* value 1 = Is DC fullscreen
|
* value 1 = Is DC fullscreen
|
||||||
* value 2 = Get Complexity of visible region.
|
* value 2 = Get Complexity of visible region.
|
||||||
* value 3 = Get Driver hdev, which is a pPDev.
|
* value 3 = Get Driver hdev, which is a pPDev.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* Return one of the type values
|
* Return one of the type values
|
||||||
|
@ -445,13 +481,13 @@ DxEngGetDCState(HDC hDC,
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
/* Return the HDEV of this DC. */
|
/* Return the HDEV of this DC. */
|
||||||
retVal = (DWORD) pDC->pPDev;
|
retVal = (DWORD) pDC->pPDev;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
/* if a valid type is not found, zero is returned */
|
/* if a valid type is not found, zero is returned */
|
||||||
DPRINT1("Warning did not find type %d\n",type);
|
DPRINT1("Warning did not find type %d\n",type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DC_UnlockDc(pDC);
|
DC_UnlockDc(pDC);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue