mirror of
https://github.com/reactos/reactos.git
synced 2024-10-07 18:04:41 +00:00
4ea9a8a667
The main motivation to port all that back is to get rid of Win32K-BSODs 0x50 like CORE-13907 that could be triggered by user-mode-applications. Technical reason was CORE-14857 "RtlImageNtHeaderEx needs SEH" and issues with hooks+callbacks. All other tickets mentioned in here were regressions that we experienced on the long journey towards perfecting the fixes on master head, and those were not happening yet in the older builds, so they are mentioned in here only to allow tracking where that code went into. Thanks to Jim Tabor, Mark Jansen & Thomas Faber By squashed backmerge of the following commits: 0.4.15-dev-3440-ga89844f740
0.4.15-dev-3430-g9cff384c22
0.4.14-dev-1287-g568b6d0558
0.4.14-dev-1255-g177ae91bf6
0.4.14-dev-1241-g915a5764a9
0.4.14-dev-1240-gd8add40e89
0.4.14-dev-1002-gfeb7df42b4
JIRA-tickets: CORE-13907, CORE-16769, CORE-14857, CORE-17856, CORE-17857, partially CORE-13019. We also had some more dupes of CORE-13907 in JIRA, but I linked all of them (transitively) towards the initial report, and resolved them without setting a fixVer for them. In more detail: -------------- [USER32] Fix BSOD 0x50 in 'WineVDM + Castle Of Winds' CORE-17856 CORE-17857 CORE-17856 BSOD 0x50 when starting Castle of the Winds second time, with WineVDM CORE-17857 BSOD 0x50 on shutdown after closing Castle of the Winds with WineVDM 0.4.15-dev-3430-g9cff384c22
0.4.15-dev-3440-ga89844f740
-------------- [NTUSER] Fix Strings and Format to Hooks Allocate heap instead of data segment to be used for callbacks on user side. Move and correct initial hook call out setup. Use it in more than one hook call. This fixes issues with strings out of alignment and use of kernel pointers. See CORE-13907 (HXD-portable BSOD) and CORE-16769 (HXD-portable exception) Small wow update. cherry picked from commit 0.4.14-dev-1287-g568b6d0558
-------------- [RTL] Introduce RtlpImageNtHeader, which implements the required functionality. ntdll and ntoskrnl now have a wrapper for this, with SEH. This protects the function against malformed / bad images, whilst still being able to use the code in freeldr et al. Idea from Thomas. CORE-14857 cherry picked from commit 0.4.14-dev-1255-g177ae91bf6
-------------- [WIN32SS] Form Sanity to Hook Callbacks Fix WH_CALLWNDPROC/RET data to user hook calls. Helps with CORE-13907 "(HXD-portable BSOD)" Fixes the logging of "(win32ss/user/ntuser/callback.c:748) err: Failure to make Callback! Status 0xc00000fd" within CORE-13019, but not the whole ticket. cherry picked from commit 0.4.14-dev-1241-g915a5764a9
-------------- [USER32] Fix null return. See CORE-16769 "HxD 1.7.7.0 portable unhandled exception" cherry picked from commit 0.4.14-dev-1240-gd8add40e89
-------------- [WIN32SS] Fix a typo in dbg print cherry picked from commit 0.4.14-dev-1002-gfeb7df42b4
79 lines
2 KiB
C
79 lines
2 KiB
C
#pragma once
|
|
|
|
LRESULT APIENTRY
|
|
co_IntCallWindowProc(WNDPROC Proc,
|
|
BOOLEAN IsAnsiProc,
|
|
HWND Wnd,
|
|
UINT Message,
|
|
WPARAM wParam,
|
|
LPARAM lParam,
|
|
INT lParamBufferSize);
|
|
|
|
VOID APIENTRY
|
|
co_IntCallSentMessageCallback(SENDASYNCPROC CompletionCallback,
|
|
HWND hWnd,
|
|
UINT Msg,
|
|
ULONG_PTR CompletionCallbackContext,
|
|
LRESULT Result);
|
|
|
|
|
|
HMENU APIENTRY
|
|
co_IntLoadSysMenuTemplate(VOID);
|
|
|
|
BOOL APIENTRY
|
|
co_IntLoadDefaultCursors(VOID);
|
|
|
|
LRESULT APIENTRY
|
|
co_IntCallHookProc(INT HookId,
|
|
INT Code,
|
|
WPARAM wParam,
|
|
LPARAM lParam,
|
|
HOOKPROC Proc,
|
|
INT Mod,
|
|
ULONG_PTR offPfn,
|
|
BOOLEAN Ansi,
|
|
PUNICODE_STRING ModuleName);
|
|
|
|
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);
|
|
|
|
VOID FASTCALL
|
|
IntCleanupThreadCallbacks(PTHREADINFO W32Thread);
|
|
|
|
PVOID FASTCALL
|
|
IntCbAllocateMemory(ULONG Size);
|
|
|
|
VOID FASTCALL
|
|
IntCbFreeMemory(PVOID Data);
|
|
|
|
HMENU APIENTRY co_IntCallLoadMenu(HINSTANCE,PUNICODE_STRING);
|
|
|
|
NTSTATUS APIENTRY co_IntClientThreadSetup(VOID);
|
|
|
|
BOOL
|
|
NTAPI
|
|
co_IntClientLoadLibrary(PUNICODE_STRING strLibName,
|
|
PUNICODE_STRING strInitFunc,
|
|
BOOL Unload,
|
|
BOOL ApiHook);
|
|
|
|
BOOL
|
|
APIENTRY
|
|
co_IntGetCharsetInfo(LCID Locale, PCHARSETINFO pCs);
|
|
|
|
HANDLE FASTCALL co_IntCopyImage(HANDLE,UINT,INT,INT,UINT);
|
|
|
|
BOOL FASTCALL co_IntSetWndIcons(VOID);
|
|
VOID FASTCALL co_IntDeliverUserAPC(VOID);
|
|
VOID FASTCALL co_IntSetupOBM(VOID);
|
|
BOOL FASTCALL IntMsgCreateStructW(PWND,CREATESTRUCTW*,CREATESTRUCTW*,PVOID*,PVOID*);
|