ReactOS 0.4.16-dev-1109-gd06d9f3
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
65
71 _Out_opt_ PULONG NameLength,
75
76VOID
79
80typedef struct _GDI_POOL *PGDI_POOL;
81
86 ULONG ulTag);
87
88VOID
91
95 PGDI_POOL pPool);
96
97VOID
100 PGDI_POOL pPool,
101 PVOID pvAlloc);
102
104VOID
106{
107 /* Try acquiring the lock */
109 {
110 /* Someone changed it, use the slow path */
112 }
113}
114
118{
119 /* Try acquiring the lock */
121}
122
124VOID
126{
127 EX_PUSH_LOCK OldValue;
128
129 /* Unlock the pushlock */
130 OldValue.Value = InterlockedExchangeAddSizeT((PSIZE_T)PushLock,
132 /* Check if anyone is waiting on it and it's not already waking */
133 if ((OldValue.Waiting) && !(OldValue.Waking))
134 {
135 /* Wake it up */
136 ExfTryToWakePushLock(PushLock);
137 }
138}
139
141VOID
143{
144 *(PULONG_PTR)Lock = 0;
145}
146#define ExInitializePushLock _ExInitializePushLock
147
151
155
157
159
#define EX_PUSH_LOCK_LOCK
Definition: Object.c:29
#define EX_PUSH_LOCK_LOCK_V
Definition: Object.c:28
unsigned char BOOLEAN
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
LONG_PTR SSIZE_T
Definition: basetsd.h:181
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
LPWSTR Name
Definition: desk.c:124
#define APIENTRY
Definition: api.h:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
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 _Out_opt_
Definition: no_sal2.h:214
#define _In_
Definition: no_sal2.h:158
#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:467
ULONG_PTR Waiting
Definition: extypes.h:462
ULONG_PTR Waking
Definition: extypes.h:463
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
_In_ WDFCOLLECTION _In_ ULONG Index
_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:117
HBITMAP NTAPI UserLoadImage(PCWSTR)
Definition: file.c:159
USHORT gusLanguageID
Definition: init.c:12
NTSTATUS NTAPI RegDeleteValueW(_In_ HKEY hKey, _In_ LPCWSTR pszValueName)
Definition: registry.c:493
BOOL InitializeGreCSRSS(VOID)
Definition: init.c:79
USHORT FASTCALL UserGetLanguageID(VOID)
Definition: misc.c:105
NTSTATUS FASTCALL IntSafeCopyUnicodeString(PUNICODE_STRING Dest, PUNICODE_STRING Source)
Definition: misc.c:639
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:142
FORCEINLINE VOID ExAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
Definition: misc.h:105
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:80
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:685
BOOL NTAPI RegReadDWORD(HKEY hkey, PCWSTR pwszValue, PDWORD pdwData)
Definition: registry.c:149
struct INTENG_ENTER_LEAVE_TAG * PINTENG_ENTER_LEAVE
NTSTATUS NTAPI RegEnumValueW(_In_ HKEY hKey, _In_ ULONG Index, _Out_opt_ LPWSTR Name, _Out_opt_ PULONG NameLength, _Out_opt_ PULONG Type, _Out_opt_ PVOID Data, _Out_opt_ PULONG DataLength)
Definition: registry.c:391
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:125
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
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185