60 ERR(
"CbFM Thread is already in cleanup\n");
143 ULONG ArgumentLength;
147 ULONG_PTR pLibNameBuffer = 0, pInitFuncBuffer = 0;
158 pLibNameBuffer = ArgumentLength;
159 ArgumentLength += pstrLibName->
Length +
sizeof(
WCHAR);
163 pInitFuncBuffer = ArgumentLength;
164 ArgumentLength += pstrInitFunc->
Length +
sizeof(
WCHAR);
169 if(pArguments ==
NULL)
193 pInitFuncBuffer += (
ULONG_PTR)pArguments;
199 pInitFuncBuffer -= (
ULONG_PTR)pArguments;
226 bResult = *(
BOOL*)ResultPointer;
245 PVOID ResultPointer, pActCtx;
256 Arguments.
Context = CompletionCallbackContext;
275 ERR(
"KeUserModeCallback failed with %lx\n",
Status);
288 INT lParamBufferSize)
293 PVOID ResultPointer, pActCtx;
296 ULONG ArgumentLength;
299 TRACE(
"co_IntCallWindowProc(Proc %p, IsAnsiProc: %s, Wnd %p, Message %u, wParam %Iu, lParam %Id, lParamBufferSize %d)\n",
305 if (lParamBufferSize != -1)
309 if (
NULL == Arguments)
311 ERR(
"Unable to allocate buffer for window proc callback\n");
319 Arguments = &StackArguments;
322 Arguments->
Proc = Proc;
324 Arguments->
Wnd = Wnd;
329 ResultPointer =
NULL;
355 ERR(
"Failed to copy result from user mode, Message %u lParam size %d!\n",
Message, lParamBufferSize);
366 ERR(
"Call to user mode failed! 0x%08lx\n",
Status);
367 if (lParamBufferSize != -1)
375 if (lParamBufferSize != -1)
385 TRACE(
"Don't copy lParam, Message %u Size %d lParam %d!\n",
Message, lParamBufferSize,
lParam);
393 case WM_STYLECHANGING:
399 TRACE(
"Copy lParam, Message %u Size %d lParam %d!\n",
Message, lParamBufferSize,
lParam);
415 ERR(
"Failed to copy lParam to user space, Message %u!\n",
Message);
438 ResultPointer =
NULL;
481 ResultPointer =
NULL;
518 ULONG ArgumentLength;
543 ERR(
"Thread is in cleanup and trying to call hook %d\n",
Code);
559 ERR(
"WH_CBT HCBT_CREATEWND wParam bad hWnd!\n");
562 TRACE(
"HCBT_CREATEWND AnsiCreator %s, AnsiHook %s\n", pWnd->
state &
WNDS_ANSICREATOR ?
"True" :
"False", Ansi ?
"True" :
"False");
571 ArgumentLength +=
sizeof(
RECTL);
589 ERR(
"Trying to call unsupported CBT hook %d\n",
Code);
612 ArgumentLength += lParamSize;
625 ArgumentLength += lParamSize;
631 ArgumentLength +=
sizeof(
MSG);
638 ERR(
"Trying to call unsupported window hook %d\n", HookId);
643 if (
NULL == Argument)
645 ERR(
"HookProc callback %d failed: out of memory %d\n",HookId,ArgumentLength);
743 ResultPointer =
NULL;
760 ERR(
"Failure to make Callback %d! Status 0x%x ArgumentLength %d\n",HookId,
Status,ArgumentLength);
783 ERR(
"ERROR: Hook %d Code %d ResultPointer 0x%p ResultLength %u\n",HookId,
Code,ResultPointer,
ResultLength);
794 if (CbtCreatewndExtra)
800 CbtCreateWnd->
lpcs->
x = CbtCreatewndExtra->
Cs.
x;
801 CbtCreateWnd->
lpcs->
y = CbtCreatewndExtra->
Cs.
y;
802 CbtCreateWnd->
lpcs->
cx = CbtCreatewndExtra->
Cs.
cx;
803 CbtCreateWnd->
lpcs->
cy = CbtCreatewndExtra->
Cs.
cy;
826 ERR(
"Exception CallHookProc HookId %d Code %d\n",HookId,
Code);
853 PVOID Argument, ResultPointer;
858 if (
NULL == Argument)
860 ERR(
"EventProc callback failed: out of memory\n");
875 ResultPointer =
NULL;
910 PVOID Argument, ResultPointer;
914 ArgumentLength += pMenuName->
Length +
sizeof(
WCHAR);
917 if (
NULL == Argument)
919 ERR(
"LoadMenu callback failed: out of memory\n");
930 ResultPointer =
NULL;
963 PVOID Argument, ResultPointer;
969 Argument = ResultPointer =
NULL;
990 PVOID Argument, ResultPointer;
994 Argument = ResultPointer =
NULL;
999 if (
NULL == Argument)
1001 ERR(
"CopyImage callback failed: out of memory\n");
1029 ERR(
"CopyImage callback failed!\n");
1044 PVOID Argument, ResultPointer;
1050 if (
NULL == Argument)
1052 ERR(
"GetCharsetInfo callback failed: out of memory\n");
1059 ResultPointer =
NULL;
1079 ERR(
"Failed to copy result from user mode!\n");
1093 ERR(
"GetCharsetInfo Failed!!\n");
1105 PVOID Argument, ResultPointer;
1108 ResultPointer =
NULL;
1112 if (
NULL == Argument)
1114 ERR(
"Set Window Icons callback failed: out of memory\n");
1132 ERR(
"Set Window Icons callback failed!\n");
1149 ERR(
"hIconSmWindows %p hIconWindows %p \n",
gpsi->hIconSmWindows,
gpsi->hIconWindows);
1160 PVOID ResultPointer;
1175 ERR(
"Delivering User APC callback failed!\n");
1184 PVOID Argument, ResultPointer;
1187 ResultPointer =
NULL;
1191 if (
NULL == Argument)
1193 ERR(
"Set Window Icons callback failed: out of memory\n");
1211 ERR(
"Set Window Icons callback failed!\n");
1230 PVOID ResultPointer;
1241 ERR(
"User UMPD callback failed!\n");
1245 if (OutSize)
RtlMoveMemory( pvOutData, ResultPointer, OutSize );
1294 (
PVOID*)&ResultPointer,
1308 ret = ResultPointer->
ret;
const TCHAR * CompletionCallback(unsigned __int64 &rnIndex, const BOOL *pblnForward, const TCHAR *pszContext, const TCHAR *pszBegin)
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char * ModuleName
NTSTATUS NTAPI KeUserModeCallback(IN ULONG RoutineIndex, IN PVOID Argument, IN ULONG ArgumentLength, OUT PVOID *Result, OUT PULONG ResultLength)
#define DBG_DEFAULT_CHANNEL(ch)
#define NT_SUCCESS(StatCode)
static const WCHAR Message[]
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
static VOID NTAPI Unload(PDRIVER_OBJECT DriverObject)
GLuint GLuint GLsizei GLenum type
#define CTI_INSENDMESSAGE
#define GetWin32ClientInfo()
#define EXCEPTION_EXECUTE_HANDLER
#define ExFreePoolWithTag(_P, _T)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static HWINEVENTHOOK(WINAPI *pSetWinEventHook)(DWORD
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
UNICODE_STRING strLibraryName
UNICODE_STRING strInitFuncName
struct tagOEMBITMAPINFO oembmi[93]
LIST_ENTRY W32CallbackListHead
struct _CLIENTTHREADINFO * pcti
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
PWND FASTCALL UserGetWindowObject(HWND hWnd)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
struct _WINDOWPROC_CALLBACK_ARGUMENTS WINDOWPROC_CALLBACK_ARGUMENTS
struct tagCWPR_Struct * PCWPR_Struct
struct _COPYIMAGE_CALLBACK_ARGUMENTS * PCOPYIMAGE_CALLBACK_ARGUMENTS
struct _HOOKPROC_CALLBACK_ARGUMENTS HOOKPROC_CALLBACK_ARGUMENTS
struct _HOOKPROC_CALLBACK_ARGUMENTS * PHOOKPROC_CALLBACK_ARGUMENTS
struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
struct _GET_CHARSET_INFO GET_CHARSET_INFO
struct _LOADMENU_CALLBACK_ARGUMENTS * PLOADMENU_CALLBACK_ARGUMENTS
struct _HOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS * PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS
struct tagCWP_Struct * PCWP_Struct
struct tagCWP_Struct CWP_Struct
struct _CLIENT_LOAD_LIBRARY_ARGUMENTS CLIENT_LOAD_LIBRARY_ARGUMENTS
struct tagCWPR_Struct CWPR_Struct
struct _EVENTPROC_CALLBACK_ARGUMENTS * PEVENTPROC_CALLBACK_ARGUMENTS
struct _SETWNDICONS_CALLBACK_ARGUMENTS SETWNDICONS_CALLBACK_ARGUMENTS
struct _COPYIMAGE_CALLBACK_ARGUMENTS COPYIMAGE_CALLBACK_ARGUMENTS
struct _SETOBM_CALLBACK_ARGUMENTS * PSETOBM_CALLBACK_ARGUMENTS
struct _SETOBM_CALLBACK_ARGUMENTS SETOBM_CALLBACK_ARGUMENTS
struct _LOADMENU_CALLBACK_ARGUMENTS LOADMENU_CALLBACK_ARGUMENTS
struct _IMMLOADLAYOUT_CALLBACK_OUTPUT IMMLOADLAYOUT_CALLBACK_OUTPUT
struct _GET_CHARSET_INFO * PGET_CHARSET_INFO
struct _EVENTPROC_CALLBACK_ARGUMENTS EVENTPROC_CALLBACK_ARGUMENTS
struct _SETWNDICONS_CALLBACK_ARGUMENTS * PSETWNDICONS_CALLBACK_ARGUMENTS
BOOL NTAPI co_IntClientLoadLibrary(PUNICODE_STRING pstrLibName, PUNICODE_STRING pstrInitFunc, BOOL Unload, BOOL ApiHook)
VOID FASTCALL IntCleanupThreadCallbacks(PTHREADINFO W32Thread)
VOID FASTCALL co_IntSetupOBM(VOID)
BOOL APIENTRY co_IntGetCharsetInfo(LCID Locale, PCHARSETINFO pCs)
DWORD APIENTRY co_IntImmProcessKey(HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID)
BOOL APIENTRY co_ClientImmLoadLayout(_In_ HKL hKL, _Inout_ PIMEINFOEX pImeInfoEx)
LRESULT APIENTRY co_IntCallHookProc(INT HookId, INT Code, WPARAM wParam, LPARAM lParam, HOOKPROC Proc, INT Mod, ULONG_PTR offPfn, BOOLEAN Ansi, PUNICODE_STRING ModuleName)
VOID APIENTRY co_IntCallSentMessageCallback(SENDASYNCPROC CompletionCallback, HWND hWnd, UINT Msg, ULONG_PTR CompletionCallbackContext, LRESULT Result)
BOOL APIENTRY co_IntLoadDefaultCursors(VOID)
LRESULT APIENTRY co_IntCallEventProc(HWINEVENTHOOK hook, DWORD event, HWND hWnd, LONG idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime, WINEVENTPROC Proc, INT Mod, ULONG_PTR offPfn)
PVOID FASTCALL IntCbAllocateMemory(ULONG Size)
VOID FASTCALL IntCbFreeMemory(PVOID Data)
HMENU APIENTRY co_IntLoadSysMenuTemplate(VOID)
HMENU APIENTRY co_IntCallLoadMenu(HINSTANCE hModule, PUNICODE_STRING pMenuName)
struct _INT_CALLBACK_HEADER * PINT_CALLBACK_HEADER
BOOL FASTCALL co_IntSetWndIcons(VOID)
LRESULT APIENTRY co_UserCBClientPrinterThunk(PVOID pkt, INT InSize, PVOID pvOutData, INT OutSize)
struct _INT_CALLBACK_HEADER INT_CALLBACK_HEADER
LRESULT APIENTRY co_IntCallWindowProc(WNDPROC Proc, BOOLEAN IsAnsiProc, HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam, INT lParamBufferSize)
NTSTATUS APIENTRY co_IntClientThreadSetup(VOID)
static VOID IntSetTebWndCallback(HWND *hWnd, PWND *pWnd, PVOID *pActCtx)
static VOID IntRestoreTebWndCallback(HWND hWnd, PWND pWnd, PVOID pActCtx)
HANDLE FASTCALL co_IntCopyImage(HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags)
VOID FASTCALL co_IntDeliverUserAPC(VOID)
VOID IntLoadSystenIcons(HICON hcur, DWORD id)
PTHREADINFO gptiDesktopThread
static __inline PVOID DesktopHeapAddressToUser(PVOID lpMem)
UINT lParamMemorySize(UINT Msg, WPARAM wParam, LPARAM lParam)
VOID(CALLBACK * WINEVENTPROC)(HWINEVENTHOOK, DWORD, HWND, LONG, LONG, DWORD, DWORD)
LRESULT(CALLBACK * HOOKPROC)(int, WPARAM, LPARAM)
void(CALLBACK * SENDASYNCPROC)(HWND, UINT, ULONG_PTR, LRESULT)
#define WH_CALLWNDPROCRET
#define WM_WINDOWPOSCHANGING
struct tagMOUSEHOOKSTRUCT MOUSEHOOKSTRUCT
struct tagCBTACTIVATESTRUCT CBTACTIVATESTRUCT
struct tagCREATESTRUCTW CREATESTRUCTW
BOOL WINAPI InSendMessage(void)
#define HCBT_CLICKSKIPPED
struct tagMSLLHOOKSTRUCT MSLLHOOKSTRUCT
struct tagKBDLLHOOKSTRUCT KBDLLHOOKSTRUCT
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
#define WH_FOREGROUNDIDLE
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO