ReactOS 0.4.15-dev-5863-g1fe3ab7
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
29
33 LPCWSTR pwszKeyName,
34 PHKEY phkey);
35
39 IN HKEY hkey,
43 IN OUT PULONG pcbValue);
44
45VOID
47RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData);
48
49VOID
51RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData);
52
53BOOL
55RegReadDWORD(HKEY hkey, PWSTR pwszValue, PDWORD pdwData);
56
59RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault);
60
64
65typedef struct _GDI_POOL *PGDI_POOL;
66
71 ULONG ulTag);
72
73VOID
76
80 PGDI_POOL pPool);
81
82VOID
85 PGDI_POOL pPool,
86 PVOID pvAlloc);
87
89VOID
91{
92 /* Try acquiring the lock */
94 {
95 /* Someone changed it, use the slow path */
97 }
98}
99
103{
104 /* Try acquiring the lock */
106}
107
109VOID
111{
112 EX_PUSH_LOCK OldValue;
113
114 /* Unlock the pushlock */
115 OldValue.Value = InterlockedExchangeAddSizeT((PSIZE_T)PushLock,
117 /* Check if anyone is waiting on it and it's not already waking */
118 if ((OldValue.Waiting) && !(OldValue.Waking))
119 {
120 /* Wake it up */
121 ExfTryToWakePushLock(PushLock);
122 }
123}
124
126VOID
128{
129 *(PULONG_PTR)Lock = 0;
130}
131#define ExInitializePushLock _ExInitializePushLock
132
136
140
142
144
#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:183
#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
_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:47
_In_z_ PCWSTR _In_ ULONG ulType
Definition: ntuser.h:48
_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:102
HBITMAP NTAPI UserLoadImage(PCWSTR)
Definition: file.c:159
USHORT gusLanguageID
Definition: main.c:29
USHORT FASTCALL UserGetLanguageID(VOID)
Definition: misc.c:97
NTSTATUS FASTCALL IntSafeCopyUnicodeString(PUNICODE_STRING Dest, PUNICODE_STRING Source)
Definition: misc.c:633
PGDI_POOL NTAPI GdiPoolCreate(ULONG cjAllocSize, ULONG ulTag)
Definition: gdipool.c:316
BOOL NTAPI RegReadDWORD(HKEY hkey, PWSTR pwszValue, PDWORD pdwData)
Definition: registry.c:150
FORCEINLINE VOID _ExInitializePushLock(PEX_PUSH_LOCK Lock)
Definition: misc.h:127
FORCEINLINE VOID ExAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: misc.h:90
VOID NTAPI GdiPoolFree(PGDI_POOL pPool, PVOID pvAlloc)
Definition: gdipool.c:233
struct INTENG_ENTER_LEAVE_TAG INTENG_ENTER_LEAVE
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition: error.c:37
BOOL APIENTRY IntEngLeave(PINTENG_ENTER_LEAVE EnterLeave)
Definition: engmisc.c:162
struct _GDI_POOL * PGDI_POOL
Definition: misc.h:65
BOOL APIENTRY IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave, SURFOBJ *DestObj, RECTL *DestRect, BOOL ReadOnly, POINTL *Translate, SURFOBJ **OutputObj)
Definition: engmisc.c:15
HGDIOBJ StockObjects[]
Definition: stockobj.c:100
VOID NTAPI RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData)
Definition: registry.c:128
NTSTATUS FASTCALL IntSafeCopyUnicodeStringTerminateNULL(PUNICODE_STRING Dest, PUNICODE_STRING Source)
Definition: misc.c:679
struct INTENG_ENTER_LEAVE_TAG * PINTENG_ENTER_LEAVE
PVOID APIENTRY HackSecureVirtualMemory(IN PVOID, IN SIZE_T, IN ULONG, OUT PVOID *)
Definition: mem.c:113
DWORD NTAPI RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault)
Definition: registry.c:173
VOID NTAPI GdiPoolDestroy(PGDI_POOL pPool)
Definition: gdipool.c:343
VOID NTAPI RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData)
Definition: registry.c:140
FORCEINLINE VOID ExReleasePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: misc.h:110
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
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185