mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
Implement IntGdiReferencePdev and part of IntGdiUnreferencePdev.
svn path=/trunk/; revision=33288
This commit is contained in:
parent
d0093b0beb
commit
f9df01f16b
1 changed files with 11 additions and 0 deletions
|
@ -2699,16 +2699,27 @@ IntEnumHDev(VOID)
|
|||
return &PrimarySurface;
|
||||
}
|
||||
|
||||
HSEMAPHORE hsemDriverMgmt = NULL; // Hax, should be in dllmain.c and global.
|
||||
|
||||
VOID FASTCALL
|
||||
IntGdiReferencePdev(PGDIDEVICE pPDev)
|
||||
{
|
||||
if(!hsemDriverMgmt) hsemDriverMgmt = EngCreateSemaphore(); // Hax, should be in dllmain.c
|
||||
EngAcquireSemaphore(hsemDriverMgmt);
|
||||
pPDev->cPdevRefs++;
|
||||
EngReleaseSemaphore(hsemDriverMgmt);
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType)
|
||||
{
|
||||
EngAcquireSemaphore(hsemDriverMgmt);
|
||||
pPDev->cPdevRefs--;
|
||||
if (!pPDev->cPdevRefs)
|
||||
{
|
||||
// Handle the destruction of pPDev or GDIDEVICE or PDEVOBJ or PDEV etc.
|
||||
}
|
||||
EngReleaseSemaphore(hsemDriverMgmt);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue