ReactOS 0.4.15-dev-8109-gd7be748
misc.h
Go to the documentation of this file.
1#pragma once
2
4 {
5 /* Contents is private to EngEnter/EngLeave */
13
15 SURFOBJ *DestObj,
16 RECTL *DestRect,
18 POINTL *Translate,
19 SURFOBJ **OutputObj);
20
22
23extern HGDIOBJ StockObjects[];
25
28
31
35 LPCWSTR pwszKeyName,
36 PHKEY phkey);
37
41 IN HKEY hkey,
45 IN OUT PULONG pcbValue);
46
47VOID
49RegWriteSZ(HKEY hkey, PCWSTR pwszValue, PWSTR pwszData);
50
51VOID
53RegWriteDWORD(HKEY hkey, PCWSTR pwszValue, DWORD dwData);
54
55BOOL
57RegReadDWORD(HKEY hkey, PCWSTR pwszValue, PDWORD pdwData);
58
61RegGetSectionDWORD(LPCWSTR pszSection, PCWSTR pszValue, DWORD dwDefault);
62
63VOID
66
67typedef struct _GDI_POOL *PGDI_POOL;
68
73 ULONG ulTag);
74
75VOID
78
82 PGDI_POOL pPool);
83
84VOID
87 PGDI_POOL pPool,
88 PVOID pvAlloc);
89
91VOID
93{
94 /* Try acquiring the lock */
96 {
97 /* Someone changed it, use the slow path */
99 }
100}
101
105{
106 /* Try acquiring the lock */
108}
109
111VOID
113{
114 EX_PUSH_LOCK OldValue;
115
116 /* Unlock the pushlock */
117 OldValue.Value = InterlockedExchangeAddSizeT((PSIZE_T)PushLock,
119 /* Check if anyone is waiting on it and it's not already waking */
120 if ((OldValue.Waiting) && !(OldValue.Waking))
121 {
122 /* Wake it up */
123 ExfTryToWakePushLock(PushLock);
124 }
125}
126
128VOID
130{
131 *(PULONG_PTR)Lock = 0;
132}
133#define ExInitializePushLock _ExInitializePushLock
134
138
142
144
146
#define EX_PUSH_LOCK_LOCK
Definition: Object.c:29
#define EX_PUSH_LOCK_LOCK_V
Definition: Object.c:28
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
LONG_PTR SSIZE_T
Definition: basetsd.h:181
#define APIENTRY
Definition: api.h:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
Status
Definition: gdiplustypes.h:25
#define InterlockedBitTestAndSet
Definition: interlocked.h:30
#define InterlockedExchangeAddSizeT(a, b)
Definition: interlocked.h:196
static HBITMAP
Definition: button.c:44
static HANDLE ULONG_PTR dwData
Definition: file.c:35
#define _In_
Definition: ms_sal.h:308
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
#define FASTCALL
Definition: nt_native.h:50
DWORD * PDWORD
Definition: pedump.c:68
unsigned short USHORT
Definition: pedump.c:61
VOID FASTCALL ExfTryToWakePushLock(PEX_PUSH_LOCK PushLock)
Definition: pushlock.c:1165
VOID FASTCALL ExfAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: pushlock.c:471
@ ReadOnly
Definition: arc.h:80
HBITMAP OutputBitmap
Definition: misc.h:8
SURFOBJ * OutputObj
Definition: misc.h:7
SURFOBJ * DestObj
Definition: misc.h:6
CLIPOBJ * TrivialClipObj
Definition: misc.h:9
ULONG_PTR Value
Definition: extypes.h:465
ULONG_PTR Waiting
Definition: extypes.h:460
ULONG_PTR Waking
Definition: extypes.h:461
ULONG cjAllocSize
Definition: gdipool.c:32
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG_PTR
Definition: typedefs.h:65
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
int32_t * PLONG
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_z_ PCWSTR pwszValueName
Definition: ntuser.h:42
_In_z_ PCWSTR _In_ ULONG ulType
Definition: ntuser.h:43
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
#define FORCEINLINE
Definition: wdftypes.h:67
VOID APIENTRY HackUnsecureVirtualMemory(IN PVOID)
Definition: mem.c:163
FORCEINLINE BOOLEAN ExTryAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: misc.h:104
HBITMAP NTAPI UserLoadImage(PCWSTR)
Definition: file.c:159
USHORT gusLanguageID
Definition: init.c:12
BOOL InitializeGreCSRSS(VOID)
Definition: init.c:80
USHORT FASTCALL UserGetLanguageID(VOID)
Definition: misc.c:105
NTSTATUS FASTCALL IntSafeCopyUnicodeString(PUNICODE_STRING Dest, PUNICODE_STRING Source)
Definition: misc.c:637
VOID NTAPI RegWriteDWORD(HKEY hkey, PCWSTR pwszValue, DWORD dwData)
Definition: registry.c:139
PGDI_POOL NTAPI GdiPoolCreate(ULONG cjAllocSize, ULONG ulTag)
Definition: gdipool.c:316
FORCEINLINE VOID _ExInitializePushLock(PEX_PUSH_LOCK Lock)
Definition: misc.h:129
FORCEINLINE VOID ExAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: misc.h:92
VOID NTAPI GdiPoolFree(PGDI_POOL pPool, PVOID pvAlloc)
Definition: gdipool.c:233
struct INTENG_ENTER_LEAVE_TAG INTENG_ENTER_LEAVE
BOOL APIENTRY IntEngLeave(PINTENG_ENTER_LEAVE EnterLeave)
Definition: engmisc.c:162
struct _GDI_POOL * PGDI_POOL
Definition: misc.h:67
BOOL APIENTRY IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave, SURFOBJ *DestObj, RECTL *DestRect, BOOL ReadOnly, POINTL *Translate, SURFOBJ **OutputObj)
Definition: engmisc.c:15
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition: error.c:31
DWORD NTAPI RegGetSectionDWORD(LPCWSTR pszSection, PCWSTR pszValue, DWORD dwDefault)
Definition: registry.c:172
HGDIOBJ StockObjects[]
Definition: stockobj.c:100
NTSTATUS FASTCALL IntSafeCopyUnicodeStringTerminateNULL(PUNICODE_STRING Dest, PUNICODE_STRING Source)
Definition: misc.c:683
BOOL NTAPI RegReadDWORD(HKEY hkey, PCWSTR pwszValue, PDWORD pdwData)
Definition: registry.c:149
struct INTENG_ENTER_LEAVE_TAG * PINTENG_ENTER_LEAVE
PVOID APIENTRY HackSecureVirtualMemory(IN PVOID, IN SIZE_T, IN ULONG, OUT PVOID *)
Definition: mem.c:113
VOID NTAPI GdiPoolDestroy(PGDI_POOL pPool)
Definition: gdipool.c:343
FORCEINLINE VOID ExReleasePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: misc.h:112
VOID NTAPI RegWriteSZ(HKEY hkey, PCWSTR pwszValue, PWSTR pwszData)
Definition: registry.c:127
BOOL NTAPI W32kDosPathNameToNtPathName(PCWSTR, PUNICODE_STRING)
PVOID NTAPI GdiPoolAllocate(PGDI_POOL pPool)
Definition: gdipool.c:122
_In_ ULONG _In_ ULONG ulTag
Definition: winddi.h:3942
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3749
#define RegOpenKey
Definition: winreg.h:519
#define RegQueryValue
Definition: winreg.h:523
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185