mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +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;
|
return &PrimarySurface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HSEMAPHORE hsemDriverMgmt = NULL; // Hax, should be in dllmain.c and global.
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
IntGdiReferencePdev(PGDIDEVICE pPDev)
|
IntGdiReferencePdev(PGDIDEVICE pPDev)
|
||||||
{
|
{
|
||||||
|
if(!hsemDriverMgmt) hsemDriverMgmt = EngCreateSemaphore(); // Hax, should be in dllmain.c
|
||||||
|
EngAcquireSemaphore(hsemDriverMgmt);
|
||||||
pPDev->cPdevRefs++;
|
pPDev->cPdevRefs++;
|
||||||
|
EngReleaseSemaphore(hsemDriverMgmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType)
|
IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType)
|
||||||
{
|
{
|
||||||
|
EngAcquireSemaphore(hsemDriverMgmt);
|
||||||
pPDev->cPdevRefs--;
|
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