mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +00:00
[Win32SS|GDI] Implement seldom used API and update types for local DC's.
Two working in house application require these API. Known as FolCOL and Reach.
This commit is contained in:
parent
a602bc3550
commit
970344bd16
8 changed files with 150 additions and 98 deletions
|
@ -1484,6 +1484,40 @@ GDIOBJ_ConvertToStockObj(HGDIOBJ *phObj)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
NTAPI
|
||||
GDIOBJ_ConvertFromStockObj(HGDIOBJ *phObj)
|
||||
{
|
||||
PENTRY pentry;
|
||||
POBJ pobj;
|
||||
|
||||
/* Reference the handle entry */
|
||||
pentry = ENTRY_ReferenceEntryByHandle(*phObj, 0);
|
||||
if (!pentry)
|
||||
{
|
||||
DPRINT1("GDIOBJ: Requested handle 0x%p is not valid.\n", *phObj);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Update the entry */
|
||||
pentry->FullUnique &= ~GDI_ENTRY_STOCK_MASK;
|
||||
pentry->ObjectOwner.ulObj = 0;
|
||||
|
||||
/* Get the pointer to the BASEOBJECT */
|
||||
pobj = pentry->einfo.pobj;
|
||||
|
||||
/* Calculate the new handle */
|
||||
pobj->hHmgr = (HGDIOBJ)((ULONG_PTR)pobj->hHmgr & ~GDI_HANDLE_STOCK_MASK);
|
||||
|
||||
/* Return the new handle */
|
||||
*phObj = pobj->hHmgr;
|
||||
|
||||
/* Dereference the handle */
|
||||
GDIOBJ_vDereferenceObject(pobj);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
POBJ NTAPI
|
||||
GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue