ReactOS  0.4.14-dev-815-ge410a12
prop.c File Reference
#include <user32.h>
Include dependency graph for prop.c:

Go to the source code of this file.

Macros

#define ATOM_BUFFER_SIZE   256
 

Functions

HANDLE FASTCALL IntGetProp (HWND hWnd, ATOM Atom, BOOLEAN SystemProp)
 
HANDLE FASTCALL UserGetProp (HWND hWnd, ATOM Atom, BOOLEAN SystemProp)
 
int WINAPI EnumPropsA (HWND hWnd, PROPENUMPROCA lpEnumFunc)
 
int WINAPI EnumPropsExA (HWND hWnd, PROPENUMPROCEXA lpEnumFunc, LPARAM lParam)
 
int WINAPI EnumPropsExW (HWND hWnd, PROPENUMPROCEXW lpEnumFunc, LPARAM lParam)
 
int WINAPI EnumPropsW (HWND hWnd, PROPENUMPROCW lpEnumFunc)
 
HANDLE WINAPI GetPropA (HWND hWnd, LPCSTR lpString)
 
HANDLE WINAPI GetPropW (HWND hWnd, LPCWSTR lpString)
 
HANDLE WINAPI RemovePropA (HWND hWnd, LPCSTR lpString)
 
HANDLE WINAPI RemovePropW (HWND hWnd, LPCWSTR lpString)
 
BOOL WINAPI SetPropA (HWND hWnd, LPCSTR lpString, HANDLE hData)
 
BOOL WINAPI SetPropW (HWND hWnd, LPCWSTR lpString, HANDLE hData)
 

Macro Definition Documentation

◆ ATOM_BUFFER_SIZE

#define ATOM_BUFFER_SIZE   256

Definition at line 32 of file prop.c.

Function Documentation

◆ EnumPropsA()

int WINAPI EnumPropsA ( HWND  hWnd,
PROPENUMPROCA  lpEnumFunc 
)

Definition at line 79 of file prop.c.

80 {
81  PPROPLISTITEM pli, i;
83  DWORD Count;
84  int ret = -1;
85 
86  if(!lpEnumFunc)
87  {
89  return ret;
90  }
91 
93  if(!NT_SUCCESS(Status))
94  {
97  else
99  return ret;
100  }
101 
102  if(Count > 0)
103  {
104  pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
105  if (pli == NULL)
106  {
108  return -1;
109  }
110 
112  if(!NT_SUCCESS(Status))
113  {
114  RtlFreeHeap(GetProcessHeap(), 0, pli);
117  else
119  return ret;
120  }
121 
122  i = pli;
123  for(; Count > 0; Count--, i++)
124  {
125  char str[ATOM_BUFFER_SIZE];
126 
128  continue;
129 
130  ret = lpEnumFunc(hWnd, str, i->Data);
131  if(!ret)
132  break;
133  }
134 
135  RtlFreeHeap(GetProcessHeap(), 0, pli);
136  }
137 
138  return ret;
139 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ATOM_BUFFER_SIZE
Definition: prop.c:32
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
HWND hWnd
Definition: settings.c:17
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
NTSTATUS APIENTRY NtUserBuildPropList(_In_ HWND hWnd, _Out_writes_bytes_to_opt_(BufferSize, *Count *sizeof(PROPLISTITEM)) LPVOID Buffer, _In_ DWORD BufferSize, _Out_opt_ DWORD *Count)
Definition: prop.c:137
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define GetProcessHeap()
Definition: compat.h:403
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:417
int ret
Status
Definition: gdiplustypes.h:24
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
UINT WINAPI GlobalGetAtomNameA(ATOM nAtom, LPSTR lpBuffer, int nSize)
Definition: atom.c:484
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

◆ EnumPropsExA()

int WINAPI EnumPropsExA ( HWND  hWnd,
PROPENUMPROCEXA  lpEnumFunc,
LPARAM  lParam 
)

Definition at line 146 of file prop.c.

147 {
148  PPROPLISTITEM pli, i;
150  DWORD Count;
151  int ret = -1;
152 
153  if(!lpEnumFunc)
154  {
156  return ret;
157  }
158 
160  if(!NT_SUCCESS(Status))
161  {
164  else
166  return ret;
167  }
168 
169  if(Count > 0)
170  {
171  pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
172  if (pli == NULL)
173  {
175  return -1;
176  }
177 
179  if(!NT_SUCCESS(Status))
180  {
181  RtlFreeHeap(GetProcessHeap(), 0, pli);
184  else
186  return ret;
187  }
188 
189  i = pli;
190  for(; Count > 0; Count--, i++)
191  {
192  char str[ATOM_BUFFER_SIZE];
193 
195  continue;
196 
197  ret = lpEnumFunc(hWnd, str, i->Data, lParam);
198  if(!ret)
199  break;
200  }
201 
202  RtlFreeHeap(GetProcessHeap(), 0, pli);
203  }
204 
205  return ret;
206 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ATOM_BUFFER_SIZE
Definition: prop.c:32
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
HWND hWnd
Definition: settings.c:17
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
NTSTATUS APIENTRY NtUserBuildPropList(_In_ HWND hWnd, _Out_writes_bytes_to_opt_(BufferSize, *Count *sizeof(PROPLISTITEM)) LPVOID Buffer, _In_ DWORD BufferSize, _Out_opt_ DWORD *Count)
Definition: prop.c:137
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define GetProcessHeap()
Definition: compat.h:403
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:417
int ret
Status
Definition: gdiplustypes.h:24
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
UINT WINAPI GlobalGetAtomNameA(ATOM nAtom, LPSTR lpBuffer, int nSize)
Definition: atom.c:484
LPARAM lParam
Definition: combotst.c:139
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

◆ EnumPropsExW()

int WINAPI EnumPropsExW ( HWND  hWnd,
PROPENUMPROCEXW  lpEnumFunc,
LPARAM  lParam 
)

Definition at line 213 of file prop.c.

214 {
215  PPROPLISTITEM pli, i;
217  DWORD Count;
218  int ret = -1;
219 
220  if(!lpEnumFunc)
221  {
223  return ret;
224  }
225 
227  if(!NT_SUCCESS(Status))
228  {
231  else
233  return ret;
234  }
235 
236  if(Count > 0)
237  {
238  pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
239  if (pli == NULL)
240  {
242  return -1;
243  }
244 
246  if(!NT_SUCCESS(Status))
247  {
248  RtlFreeHeap(GetProcessHeap(), 0, pli);
251  else
253  return ret;
254  }
255 
256  i = pli;
257  for(; Count > 0; Count--, i++)
258  {
260 
262  continue;
263 
264  ret = lpEnumFunc(hWnd, str, i->Data, lParam);
265  if(!ret)
266  break;
267  }
268 
269  RtlFreeHeap(GetProcessHeap(), 0, pli);
270  }
271 
272  return ret;
273 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ATOM_BUFFER_SIZE
Definition: prop.c:32
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
HWND hWnd
Definition: settings.c:17
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
NTSTATUS APIENTRY NtUserBuildPropList(_In_ HWND hWnd, _Out_writes_bytes_to_opt_(BufferSize, *Count *sizeof(PROPLISTITEM)) LPVOID Buffer, _In_ DWORD BufferSize, _Out_opt_ DWORD *Count)
Definition: prop.c:137
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
UINT WINAPI GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:496
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define GetProcessHeap()
Definition: compat.h:403
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:417
int ret
Status
Definition: gdiplustypes.h:24
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
LPARAM lParam
Definition: combotst.c:139
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

◆ EnumPropsW()

int WINAPI EnumPropsW ( HWND  hWnd,
PROPENUMPROCW  lpEnumFunc 
)

Definition at line 280 of file prop.c.

281 {
282  PPROPLISTITEM pli, i;
284  DWORD Count;
285  int ret = -1;
286 
287  if(!lpEnumFunc)
288  {
290  return ret;
291  }
292 
294  if(!NT_SUCCESS(Status))
295  {
298  else
300  return ret;
301  }
302 
303  if(Count > 0)
304  {
305  pli = RtlAllocateHeap(GetProcessHeap(), 0, Count);
306  if (pli == NULL)
307  {
309  return -1;
310  }
311 
313  if(!NT_SUCCESS(Status))
314  {
315  RtlFreeHeap(GetProcessHeap(), 0, pli);
318  else
320  return ret;
321  }
322 
323  i = pli;
324  for(; Count > 0; Count--, i++)
325  {
327 
329  continue;
330 
331  ret = lpEnumFunc(hWnd, str, i->Data);
332  if(!ret)
333  break;
334  }
335 
336  RtlFreeHeap(GetProcessHeap(), 0, pli);
337  }
338 
339  return ret;
340 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ATOM_BUFFER_SIZE
Definition: prop.c:32
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
HWND hWnd
Definition: settings.c:17
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
NTSTATUS APIENTRY NtUserBuildPropList(_In_ HWND hWnd, _Out_writes_bytes_to_opt_(BufferSize, *Count *sizeof(PROPLISTITEM)) LPVOID Buffer, _In_ DWORD BufferSize, _Out_opt_ DWORD *Count)
Definition: prop.c:137
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
UINT WINAPI GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:496
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define GetProcessHeap()
Definition: compat.h:403
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:417
int ret
Status
Definition: gdiplustypes.h:24
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

◆ GetPropA()

HANDLE WINAPI GetPropA ( HWND  hWnd,
LPCSTR  lpString 
)

Definition at line 347 of file prop.c.

348 {
349  PWSTR lpWString;
350  UNICODE_STRING UString;
351  HANDLE Ret;
352  if (HIWORD(lpString))
353  {
354  RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
355  lpWString = UString.Buffer;
356  if (lpWString == NULL)
357  {
358  return(FALSE);
359  }
360  Ret = GetPropW(hWnd, lpWString);
361  RtlFreeUnicodeString(&UString);
362  }
363  else
364  {
365  Ret = GetPropW(hWnd, (LPWSTR)lpString);
366  }
367  return(Ret);
368 }
uint16_t * PWSTR
Definition: typedefs.h:54
HWND hWnd
Definition: settings.c:17
HANDLE WINAPI GetPropW(HWND hWnd, LPCWSTR lpString)
Definition: prop.c:375
char * LPSTR
Definition: xmlstorage.h:182
smooth NULL
Definition: ftsmooth.c:416
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define HIWORD(l)
Definition: typedefs.h:246
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ GetPropW()

HANDLE WINAPI GetPropW ( HWND  hWnd,
LPCWSTR  lpString 
)

Definition at line 375 of file prop.c.

376 {
377  ATOM Atom;
378  HANDLE Data = NULL;
379  PPROPERTY Prop;
380  if (HIWORD(lpString))
381  {
382  Atom = GlobalFindAtomW(lpString);
383  }
384  else
385  {
386  Atom = LOWORD((DWORD_PTR)lpString);
387  }
388  Prop = IntGetProp(hWnd, Atom, FALSE);
389  if (Prop != NULL) Data = Prop->Data;
390  return Data;
391 }
WORD ATOM
Definition: dimm.idl:113
HWND hWnd
Definition: settings.c:17
ATOM WINAPI GlobalFindAtomW(LPCWSTR lpString)
Definition: atom.c:474
_Out_ RTL_ATOM * Atom
Definition: class.h:54
HANDLE Data
Definition: ntuser.h:1054
smooth NULL
Definition: ftsmooth.c:416
_In_ LPGUID _In_ PVOID Data
Definition: classpnp.h:778
PPROPERTY FASTCALL IntGetProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
Definition: prop.c:16
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82

Referenced by GetPropA().

◆ IntGetProp()

HANDLE FASTCALL IntGetProp ( HWND  hWnd,
ATOM  Atom,
BOOLEAN  SystemProp 
)

Definition at line 38 of file prop.c.

39 {
40  PLIST_ENTRY ListEntry, temp;
42  PWND pWnd;
43  int i;
44  WORD SystemFlag = SystemProp ? PROPERTY_FLAG_SYSTEM : 0;
45 
46  pWnd = ValidateHwnd(hWnd);
47  if (!pWnd) return NULL;
48 
49  ListEntry = SharedPtrToUser(pWnd->PropListHead.Flink);
50  for (i = 0; i < pWnd->PropListItems; i++ )
51  {
52  Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
53  if (Property->Atom == Atom &&
54  (Property->fs & PROPERTY_FLAG_SYSTEM) == SystemFlag)
55  {
56  return(Property);
57  }
58  temp = ListEntry->Flink;
59  ListEntry = SharedPtrToUser(temp);
60  }
61  return NULL;
62 }
ULONG PropListItems
Definition: ntuser.h:688
_In_ ATOM _In_ HANDLE _In_ BOOLEAN SystemProp
Definition: prop.h:22
LIST_ENTRY PropListHead
Definition: ntuser.h:687
HWND hWnd
Definition: settings.c:17
_Out_ RTL_ATOM * Atom
Definition: class.h:54
#define PROPERTY_FLAG_SYSTEM
Definition: ntuser.h:1049
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
unsigned short WORD
Definition: ntddk_ex.h:93
PWND FASTCALL ValidateHwnd(HWND hwnd)
Definition: misc.c:369
Definition: typedefs.h:117
_In_ DWORD Property
Definition: setupapi.h:1545
Definition: ntuser.h:657
static calc_node_t temp
Definition: rpn_ieee.c:38
static __inline PVOID SharedPtrToUser(PVOID Ptr)
Definition: user_x.h:4

◆ RemovePropA()

HANDLE WINAPI RemovePropA ( HWND  hWnd,
LPCSTR  lpString 
)

Definition at line 398 of file prop.c.

399 {
400  PWSTR lpWString;
401  UNICODE_STRING UString;
402  HANDLE Ret;
403 
404  if (HIWORD(lpString))
405  {
406  RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
407  lpWString = UString.Buffer;
408  if (lpWString == NULL)
409  {
410  return(FALSE);
411  }
412  Ret = RemovePropW(hWnd, lpWString);
413  RtlFreeUnicodeString(&UString);
414  }
415  else
416  {
417  Ret = RemovePropW(hWnd, (LPCWSTR)lpString);
418  }
419  return(Ret);
420 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
uint16_t * PWSTR
Definition: typedefs.h:54
HWND hWnd
Definition: settings.c:17
char * LPSTR
Definition: xmlstorage.h:182
smooth NULL
Definition: ftsmooth.c:416
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
HANDLE WINAPI RemovePropW(HWND hWnd, LPCWSTR lpString)
Definition: prop.c:427
#define HIWORD(l)
Definition: typedefs.h:246

◆ RemovePropW()

HANDLE WINAPI RemovePropW ( HWND  hWnd,
LPCWSTR  lpString 
)

Definition at line 427 of file prop.c.

429 {
430  ATOM Atom;
431  if (HIWORD(lpString))
432  {
433  Atom = GlobalFindAtomW(lpString);
434  }
435  else
436  {
437  Atom = LOWORD((DWORD_PTR)lpString);
438  }
439  return(NtUserRemoveProp(hWnd, Atom));
440 }
WORD ATOM
Definition: dimm.idl:113
HWND hWnd
Definition: settings.c:17
ATOM WINAPI GlobalFindAtomW(LPCWSTR lpString)
Definition: atom.c:474
_Out_ RTL_ATOM * Atom
Definition: class.h:54
HANDLE APIENTRY NtUserRemoveProp(_In_ HWND hWnd, _In_ ATOM Atom)
Definition: prop.c:220
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82

Referenced by RemovePropA().

◆ SetPropA()

BOOL WINAPI SetPropA ( HWND  hWnd,
LPCSTR  lpString,
HANDLE  hData 
)

Definition at line 447 of file prop.c.

448 {
449  PWSTR lpWString;
450  UNICODE_STRING UString;
451  BOOL Ret;
452 
453  if (HIWORD(lpString))
454  {
455  RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
456  lpWString = UString.Buffer;
457  if (lpWString == NULL)
458  {
459  return(FALSE);
460  }
461  Ret = SetPropW(hWnd, lpWString, hData);
462  RtlFreeUnicodeString(&UString);
463  }
464  else
465  {
466  Ret = SetPropW(hWnd, (LPWSTR)lpString, hData);
467  }
468  return(Ret);
469 }
uint16_t * PWSTR
Definition: typedefs.h:54
HWND hWnd
Definition: settings.c:17
char * LPSTR
Definition: xmlstorage.h:182
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
BOOL WINAPI SetPropW(HWND hWnd, LPCWSTR lpString, HANDLE hData)
Definition: prop.c:476
#define HIWORD(l)
Definition: typedefs.h:246
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ SetPropW()

BOOL WINAPI SetPropW ( HWND  hWnd,
LPCWSTR  lpString,
HANDLE  hData 
)

Definition at line 476 of file prop.c.

477 {
478  ATOM Atom;
479  if (HIWORD(lpString))
480  {
481  Atom = GlobalAddAtomW(lpString);
482  }
483  else
484  {
485  Atom = LOWORD((DWORD_PTR)lpString);
486  }
487 
488  return(NtUserSetProp(hWnd, Atom, hData));
489 }
WORD ATOM
Definition: dimm.idl:113
HWND hWnd
Definition: settings.c:17
_Out_ RTL_ATOM * Atom
Definition: class.h:54
BOOL APIENTRY NtUserSetProp(_In_ HWND hWnd, _In_ ATOM Atom, _In_ HANDLE Data)
Definition: prop.c:247
uint32_t DWORD_PTR
Definition: typedefs.h:63
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82

Referenced by SetPropA().

◆ UserGetProp()

HANDLE FASTCALL UserGetProp ( HWND  hWnd,
ATOM  Atom,
BOOLEAN  SystemProp 
)

Definition at line 66 of file prop.c.

67 {
68  PPROPERTY Prop;
69  Prop = IntGetProp(hWnd, Atom, SystemProp);
70  return Prop ? Prop->Data : NULL;
71 }
_In_ ATOM _In_ HANDLE _In_ BOOLEAN SystemProp
Definition: prop.h:22
HWND hWnd
Definition: settings.c:17
_Out_ RTL_ATOM * Atom
Definition: class.h:54
HANDLE Data
Definition: ntuser.h:1054
smooth NULL
Definition: ftsmooth.c:416
PPROPERTY FASTCALL IntGetProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
Definition: prop.c:16