Go to the source code of this file.
|
| VOID WINAPI | UserSetLastError (IN DWORD dwErrCode) |
| |
| VOID WINAPI | UserSetLastNTError (IN NTSTATUS Status) |
| |
| PTHREADINFO | GetW32ThreadInfo (VOID) |
| |
| BOOL WINAPI | GetUserObjectSecurity (IN HANDLE hObject, IN PSECURITY_INFORMATION pSecurityInfo, OUT PSECURITY_DESCRIPTOR pSecurityDescriptor, IN DWORD dwLength, OUT PDWORD pdwLengthNeeded) |
| |
| BOOL WINAPI | SetUserObjectSecurity (IN HANDLE hObject, IN PSECURITY_INFORMATION pSecurityInfo, IN PSECURITY_DESCRIPTOR pSecurityDescriptor) |
| |
| BOOL WINAPI | IsGUIThread (BOOL bConvert) |
| |
| BOOL FASTCALL | TestWindowProcess (PWND Wnd) |
| |
| BOOL FASTCALL | TestState (PWND pWnd, UINT Flag) |
| |
| PUSER_HANDLE_ENTRY FASTCALL | GetUser32Handle (HANDLE handle) |
| |
| PVOID FASTCALL | ValidateHandle (HANDLE handle, UINT uType) |
| |
| PVOID FASTCALL | ValidateHandleNoErr (HANDLE handle, UINT uType) |
| |
| PCALLPROCDATA FASTCALL | ValidateCallProc (HANDLE hCallProc) |
| |
| PWND FASTCALL | ValidateHwnd (HWND hwnd) |
| |
| PWND FASTCALL | ValidateHwndNoErr (HWND hwnd) |
| |
| PWND FASTCALL | GetThreadDesktopWnd (VOID) |
| |
| PWND FASTCALL | ValidateHwndOrDesk (HWND hwnd) |
| |
| DWORD WINAPI | WCSToMBEx (WORD CodePage, LPWSTR UnicodeString, LONG UnicodeSize, LPSTR *MBString, LONG MBSize, BOOL Allocate) |
| |
| DWORD WINAPI | MBToWCSEx (WORD CodePage, LPSTR MBString, LONG MBSize, LPWSTR *UnicodeString, LONG UnicodeSize, BOOL Allocate) |
| |
◆ GetThreadDesktopWnd()
◆ GetUser32Handle()
Definition at line 195 of file misc.c.
196{
199
201
203
206
209
211
214
216}
_In_ uint64_t _In_ uint64_t _In_ uint64_t generation
GLuint GLuint GLsizei GLenum type
#define FIRST_USER_HANDLE
unsigned __int3264 UINT_PTR
PUSER_HANDLE_ENTRY gHandleEntries
_In_ WDFCOLLECTION _In_ ULONG Index
PUSER_HANDLE_TABLE gHandleTable
Referenced by ValidateCallProc(), ValidateHandle(), and ValidateHandleNoErr().
◆ GetUserObjectSecurity()
Definition at line 75 of file misc.c.
82{
84
86 *pSecurityInfo,
87 pSecurityDescriptor,
89 pdwLengthNeeded);
91 {
94 }
95
97}
#define NT_SUCCESS(StatCode)
static DWORD DWORD * dwLength
NTSTATUS NTAPI NtQuerySecurityObject(IN HANDLE Handle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN ULONG Length, OUT PULONG ResultLength)
VOID WINAPI UserSetLastNTError(IN NTSTATUS Status)
◆ GetW32ThreadInfo()
Definition at line 36 of file misc.c.
37{
39
42 {
43
46 }
47
48 return ti;
49}
@ THREADSTATE_GETTHREADINFO
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
struct _THREADINFO * PTHREADINFO
Referenced by co_UserActivateKeyboardLayout(), co_UserCreateWindowEx(), DceAllocDCE(), DesktopPtrToUser(), GetThreadDesktopInfo(), GetWindowThreadProcessId(), IntAssociateInputContextEx(), IntBuildHwndList(), IntCallMessageProc(), IntCallWindowProcA(), IntCallWindowProcW(), IntCheckImeShowStatus(), IntCreateCurIconHandle(), IntCreateWindow(), IntGetImeHotKeyByKey(), IntImmProcessKey(), IntSendMessageToUI(), IntSendNCPaint(), NtUserCallHwndOpt(), NtUserCallNextHookEx(), NtUserCallNoParam(), NtUserCallOneParam(), NtUserDisableThreadIme(), NtUserMessageCall(), NtUserSetShellWindowEx(), NtUserSetThreadLayoutHandles(), RawInputThreadMain(), SendMessageA(), SendMessageW(), UserCreateMenu(), UserGetDCEx(), UserRegisterClass(), and UserUpdateInputContext().
◆ IsGUIThread()
Definition at line 145 of file misc.c.
147{
150 {
151 if(bConvert)
152 {
155 else
157 }
159 }
160 else
162}
#define ERROR_NOT_ENOUGH_MEMORY
Referenced by do_InitialDesktop_child().
◆ MBToWCSEx()
Definition at line 457 of file misc.c.
458{
460 if (MBSize == -1)
461 {
462 MBSize =
strlen(MBString)+1;
463 }
464 if (UnicodeSize == -1)
465 {
467 {
468 return 0;
469 }
470 UnicodeSize = MBSize;
471 }
473 {
475 if (SafeString ==
NULL)
476 return 0;
478 }
479 UnicodeSize *=
sizeof(
WCHAR);
480 if (CodePage == 0)
481 {
483 }
484 else
485 {
487 }
489}
ACPI_SIZE strlen(const char *String)
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
#define MultiByteToWideChar
_Use_decl_annotations_ NTSTATUS NTAPI RtlMultiByteToUnicodeN(_Out_ PWCH UnicodeString, _In_ ULONG UnicodeSize, _Out_opt_ PULONG ResultSize, _In_ PCCH MbString, _In_ ULONG MbSize)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_opt_ PALLOCATE_FUNCTION Allocate
◆ SetUserObjectSecurity()
Definition at line 120 of file misc.c.
125{
127
129 *pSecurityInfo,
130 pSecurityDescriptor);
132 {
135 }
136
138}
NTSTATUS WINAPI NtSetSecurityObject(HANDLE Handle, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR SecurityDescriptor)
◆ TestState()
◆ TestWindowProcess()
◆ UserSetLastError()
◆ UserSetLastNTError()
◆ ValidateCallProc()
Definition at line 339 of file misc.c.
340{
342
344
346
348 return CallProc;
349
351}
PVOID FASTCALL ValidateHandle(HANDLE handle, UINT uType)
PUSER_HANDLE_ENTRY FASTCALL GetUser32Handle(HANDLE handle)
Referenced by CallWindowProcA(), and CallWindowProcW().
◆ ValidateHandle()
Definition at line 252 of file misc.c.
253{
256
258
260
263
264
266 (
pEntry->type != uType) ||
269 {
270 switch ( uType )
271 {
274 break;
277 break;
280 break;
283 break;
286 break;
289 break;
290 default:
292 break;
293 }
295 }
296
299 else
301
303}
#define ERROR_INVALID_HANDLE
#define HANDLEENTRY_INDESTROY
#define HANDLEENTRY_DESTROY
static __inline PVOID SharedPtrToUser(PVOID Ptr)
static const BOOL g_ObjectHeapTypeShared[TYPE_CTYPES]
#define ERROR_INVALID_ACCEL_HANDLE
#define ERROR_INVALID_DWP_HANDLE
#define ERROR_INVALID_MENU_HANDLE
#define ERROR_INVALID_WINDOW_HANDLE
#define ERROR_INVALID_CURSOR_HANDLE
#define ERROR_INVALID_HOOK_HANDLE
Referenced by ValidateCallProc(), and ValidateHwnd().
◆ ValidateHandleNoErr()
◆ ValidateHwnd()
Definition at line 359 of file misc.c.
360{
363
364
367
369}
#define GetWin32ClientInfo()
◆ ValidateHwndNoErr()
Definition at line 376 of file misc.c.
377{
381
382
385
388 {
389 return Wnd;
390 }
391
393}
PVOID FASTCALL ValidateHandleNoErr(HANDLE handle, UINT uType)
◆ ValidateHwndOrDesk()
Definition at line 410 of file misc.c.
411{
414
416}
#define ValidateHwnd(hwnd)
PWND FASTCALL GetThreadDesktopWnd(VOID)
◆ WCSToMBEx()
Definition at line 421 of file misc.c.
422{
424 if (UnicodeSize == -1)
425 {
427 }
428 if (MBSize == -1)
429 {
431 {
432 return 0;
433 }
434 MBSize = UnicodeSize * 2;
435 }
437 {
439 if (SafeString ==
NULL)
440 return 0;
441 *MBString = SafeString;
442 }
443 if (CodePage == 0)
444 {
446 }
447 else
448 {
450 }
451 return UnicodeSize;
452}
#define WideCharToMultiByte
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
◆ g_ObjectHeapTypeShared