mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Fix processid mask, update gdi handle entry, shift mask and VM memory alloc.
svn path=/trunk/; revision=28838
This commit is contained in:
parent
e7b744d5c5
commit
59a03d6577
4 changed files with 6 additions and 5 deletions
|
@ -78,7 +78,7 @@ GdiFixUpHandle(HGDIOBJ hGdiObj)
|
||||||
if (((ULONG_PTR)(hGdiObj)) & GDI_HANDLE_UPPER_MASK ) return hGdiObj;
|
if (((ULONG_PTR)(hGdiObj)) & GDI_HANDLE_UPPER_MASK ) return hGdiObj;
|
||||||
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
|
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
|
||||||
return hGdiObj = (HGDIOBJ)(((LONG_PTR)(hGdiObj)) |
|
return hGdiObj = (HGDIOBJ)(((LONG_PTR)(hGdiObj)) |
|
||||||
(Entry->Type << 16)); // Rebuild handle for Object
|
(Entry->Type << GDI_ENTRY_UPPER_SHIFT)); // Rebuild handle for Object
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -161,7 +161,8 @@
|
||||||
typedef struct _GDI_TABLE_ENTRY
|
typedef struct _GDI_TABLE_ENTRY
|
||||||
{
|
{
|
||||||
PVOID KernelData; /* Points to the kernel mode structure */
|
PVOID KernelData; /* Points to the kernel mode structure */
|
||||||
HANDLE ProcessId; /* process id that created the object, 0 for stock objects */
|
SHORT ProcessId; /* process id that created the object, 0 for stock objects */
|
||||||
|
SHORT nCount; /* usage count of object handles */
|
||||||
LONG Type; /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */
|
LONG Type; /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */
|
||||||
PVOID UserData; /* Points to the user mode structure, usually NULL though */
|
PVOID UserData; /* Points to the user mode structure, usually NULL though */
|
||||||
} GDI_TABLE_ENTRY, *PGDI_TABLE_ENTRY;
|
} GDI_TABLE_ENTRY, *PGDI_TABLE_ENTRY;
|
||||||
|
|
|
@ -2374,7 +2374,7 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
||||||
&NewMem,
|
&NewMem,
|
||||||
0,
|
0,
|
||||||
&MemSize,
|
&MemSize,
|
||||||
MEM_COMMIT,
|
MEM_COMMIT|MEM_RESERVE,
|
||||||
PAGE_READWRITE);
|
PAGE_READWRITE);
|
||||||
KeEnterCriticalRegion();
|
KeEnterCriticalRegion();
|
||||||
{
|
{
|
||||||
|
|
|
@ -89,7 +89,7 @@ ReadWriteVMDcAttr(PDC dc, FLONG Dirty, BOOL Write)
|
||||||
{
|
{
|
||||||
INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)dc->hSelf);
|
INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)dc->hSelf);
|
||||||
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
|
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
|
||||||
HANDLE ProcessId = (HANDLE)(((ULONG_PTR)(Entry->ProcessId)) & 0x0000ffff);
|
HANDLE ProcessId = (HANDLE)(((ULONG_PTR)(Entry->ProcessId)) & ~1);
|
||||||
DC_ATTR lDc_AttrData;
|
DC_ATTR lDc_AttrData;
|
||||||
|
|
||||||
if(Entry->UserData)
|
if(Entry->UserData)
|
||||||
|
|
Loading…
Reference in a new issue