From e470b583761e392641defc5b9b029e2889d02afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 22 Apr 2021 17:28:52 +0200 Subject: [PATCH] [REACTOS] Explicitly link against pseh & include pseh headers in a few places --- .../applications/mscutils/eventvwr/eventvwr.c | 20 ++++++++++--------- base/system/services/CMakeLists.txt | 5 +---- base/system/services/rpcserver.c | 2 ++ dll/np/nfs/nfs41_np.c | 2 ++ dll/win32/advapi32/service/sctrl.c | 2 ++ dll/win32/kernel32/CMakeLists.txt | 2 +- dll/win32/lsasrv/database.c | 2 ++ dll/win32/olecli32/CMakeLists.txt | 2 +- dll/win32/samsrv/database.c | 2 ++ dll/win32/setupapi/cfgmgr.c | 2 ++ dll/win32/setupapi/devinst.c | 2 ++ modules/rostests/apitests/apphelp/apphelp.c | 4 +++- modules/rostests/apitests/apphelp/db.cpp | 8 +++++--- modules/rostests/apitests/apphelp/env.c | 2 ++ .../apitests/compiler/ms/seh/CMakeLists.txt | 1 + .../apitests/gdi32/AddFontResourceEx.c | 2 ++ .../rostests/apitests/gdi32/CreateDIBitmap.c | 2 ++ .../rostests/apitests/gdi32/ExtCreatePen.c | 2 ++ modules/rostests/apitests/gdi32/GetObject.c | 2 ++ .../rostests/apitests/gdi32/SetBrushOrgEx.c | 2 ++ modules/rostests/apitests/kernel32/FLS.c | 2 ++ .../apitests/kernel32/SystemFirmware.c | 2 ++ .../apitests/localspl/dll/fpEnumPrinters.c | 2 ++ .../apitests/ntdll/LdrEnumResources.c | 2 ++ .../apitests/ntdll/NtAllocateVirtualMemory.c | 2 ++ .../apitests/ntdll/NtMapViewOfSection.c | 2 ++ .../rostests/apitests/ntdll/RtlAllocateHeap.c | 2 ++ modules/rostests/apitests/ntdll/RtlBitmap.c | 2 ++ .../apitests/ntdll/RtlMultipleAllocateHeap.c | 2 ++ .../rostests/apitests/ntdll/StackOverflow.c | 2 ++ .../apitests/ntdll/load_notifications.c | 2 ++ modules/rostests/apitests/sdk/delayimp.cpp | 6 ++++-- .../apitests/shlwapi/PathFindOnPath.c | 2 ++ .../apitests/shlwapi/SHAreIconsEqual.c | 2 ++ .../apitests/shlwapi/SHLoadIndirectString.c | 2 ++ .../rostests/apitests/spoolss/ReallocSplStr.c | 2 ++ .../winetests/kernel32/CMakeLists.txt | 1 + .../rostests/winetests/ntdll/CMakeLists.txt | 2 ++ sdk/lib/atl/CMakeLists.txt | 2 ++ sdk/lib/atl/atlcom.h | 1 + sdk/lib/crt/crt.cmake | 2 +- sdk/lib/drivers/copysup/CMakeLists.txt | 1 + sdk/lib/drivers/rdbsslib/CMakeLists.txt | 1 + sdk/lib/drivers/rxce/CMakeLists.txt | 1 + sdk/lib/rtl/CMakeLists.txt | 2 ++ win32ss/gdi/gdi32/objects/bitmap.c | 2 ++ win32ss/gdi/gdi32/wine/CMakeLists.txt | 1 + win32ss/printing/base/winspool/utils.c | 4 +++- win32ss/user/winsrv/consrv.cmake | 1 + win32ss/user/winsrv/usersrv.cmake | 1 + 50 files changed, 103 insertions(+), 23 deletions(-) diff --git a/base/applications/mscutils/eventvwr/eventvwr.c b/base/applications/mscutils/eventvwr/eventvwr.c index 5bc96ced583..94e67095b73 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.c +++ b/base/applications/mscutils/eventvwr/eventvwr.c @@ -33,6 +33,8 @@ #include #include +#include + // #include "resource.h" #define LVM_PROGRESS (WM_APP + 1) // Used by the subclassed ListView @@ -3895,7 +3897,7 @@ InitPropertiesDlg(HWND hDlg, PEVENTLOG EventLog) /* By default, it is 604800 (secs) == 7 days. On Server, the retention is zeroed out. */ dwRetention = 0; } - /* Convert in days, rounded up */ + /* Convert in days, rounded up */ if (dwRetention != INFINITE) dwRetention = (dwRetention + 24*3600 - 1) / (24*3600); @@ -4023,7 +4025,7 @@ SavePropertiesDlg(HWND hDlg, PEVENTLOG EventLog) LONG Result; DWORD dwMaxSize = 0, dwRetention = 0; HKEY hLogKey; - WCHAR *KeyPath; + WCHAR *KeyPath; SIZE_T cbKeyPath; if (!EventLog->Permanent) @@ -4054,7 +4056,7 @@ SavePropertiesDlg(HWND hDlg, PEVENTLOG EventLog) 0, REG_DWORD, (LPBYTE)&dwMaxSize, - sizeof(dwMaxSize)); + sizeof(dwMaxSize)); if (IsDlgButtonChecked(hDlg, IDC_OVERWRITE_AS_NEEDED) == BST_CHECKED) dwRetention = 0; @@ -4069,7 +4071,7 @@ SavePropertiesDlg(HWND hDlg, PEVENTLOG EventLog) REG_DWORD, (LPBYTE)&dwRetention, sizeof(dwRetention)); - + RegCloseKey(hLogKey); } @@ -4100,14 +4102,14 @@ EventLogPropProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) - { + { case PSN_APPLY: PropSheet_UnChanged(GetParent(hDlg), hDlg); SavePropertiesDlg(hDlg, EventLog); return (INT_PTR)TRUE; } break; - + case WM_COMMAND: switch (LOWORD(wParam)) { @@ -4126,7 +4128,7 @@ EventLogPropProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) } return (INT_PTR)TRUE; } - + case IDC_EDIT_EVENTS_AGE: case IDC_EDIT_MAXLOGSIZE: if (HIWORD(wParam) == EN_CHANGE) @@ -4134,7 +4136,7 @@ EventLogPropProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) PropSheet_Changed(GetParent(hDlg), hDlg); } return (INT_PTR)TRUE; - + case IDC_OVERWRITE_AS_NEEDED: { CheckRadioButton(hDlg, IDC_OVERWRITE_AS_NEEDED, IDC_NO_OVERWRITE, IDC_OVERWRITE_AS_NEEDED); @@ -4161,7 +4163,7 @@ EventLogPropProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) PropSheet_Changed(GetParent(hDlg), hDlg); return (INT_PTR)TRUE; } - + case IDC_RESTOREDEFAULTS: { LoadStringW(hInst, IDS_RESTOREDEFAULTS, szText, _countof(szText)); diff --git a/base/system/services/CMakeLists.txt b/base/system/services/CMakeLists.txt index 0005294b04b..ba38f656da2 100644 --- a/base/system/services/CMakeLists.txt +++ b/base/system/services/CMakeLists.txt @@ -20,10 +20,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/svcctl_s.c) add_executable(services ${SOURCE} services.rc) - -if(NOT MSVC) - target_link_libraries(services ${PSEH_LIB}) -endif() +target_link_libraries(services ${PSEH_LIB}) set_module_type(services win32gui UNICODE) add_importlibs(services userenv user32 advapi32 rpcrt4 msvcrt kernel32 ntdll) diff --git a/base/system/services/rpcserver.c b/base/system/services/rpcserver.c index 0c1dbcfb08a..136d86b1e50 100644 --- a/base/system/services/rpcserver.c +++ b/base/system/services/rpcserver.c @@ -15,6 +15,8 @@ #include #include +#include + #define NDEBUG #include diff --git a/dll/np/nfs/nfs41_np.c b/dll/np/nfs/nfs41_np.c index ce03c419996..161f7407e6c 100644 --- a/dll/np/nfs/nfs41_np.c +++ b/dll/np/nfs/nfs41_np.c @@ -28,6 +28,8 @@ #include "nfs41_np.h" #include "options.h" +#include + #ifdef DBG #define DbgP(_x_) NFS41DbgPrint _x_ #else diff --git a/dll/win32/advapi32/service/sctrl.c b/dll/win32/advapi32/service/sctrl.c index c0cf0f42288..f437d8e6ecc 100644 --- a/dll/win32/advapi32/service/sctrl.c +++ b/dll/win32/advapi32/service/sctrl.c @@ -12,6 +12,8 @@ /* INCLUDES ******************************************************************/ #include +#include + WINE_DEFAULT_DEBUG_CHANNEL(advapi); diff --git a/dll/win32/kernel32/CMakeLists.txt b/dll/win32/kernel32/CMakeLists.txt index 4f4eddc4f8f..11339a91e60 100644 --- a/dll/win32/kernel32/CMakeLists.txt +++ b/dll/win32/kernel32/CMakeLists.txt @@ -10,7 +10,7 @@ add_library(kernel32_shared client/shared_utils.c client/file/fileutils.c ) - +target_link_libraries(kernel32_shared PRIVATE pseh) add_dependencies(kernel32_shared psdk) list(APPEND SOURCE diff --git a/dll/win32/lsasrv/database.c b/dll/win32/lsasrv/database.c index af35f3a9b5f..591cb0131e9 100644 --- a/dll/win32/lsasrv/database.c +++ b/dll/win32/lsasrv/database.c @@ -8,6 +8,8 @@ #include "lsasrv.h" +#include + /* GLOBALS *****************************************************************/ static HANDLE SecurityKeyHandle = NULL; diff --git a/dll/win32/olecli32/CMakeLists.txt b/dll/win32/olecli32/CMakeLists.txt index 5ade3f7433b..e9f3f0cdc65 100644 --- a/dll/win32/olecli32/CMakeLists.txt +++ b/dll/win32/olecli32/CMakeLists.txt @@ -10,6 +10,6 @@ list(APPEND SOURCE add_library(olecli32 MODULE ${SOURCE}) set_module_type(olecli32 win32dll) -target_link_libraries(olecli32 wine) +target_link_libraries(olecli32 wine ${PSEH_LIB}) add_importlibs(olecli32 ole32 gdi32 msvcrt kernel32 ntdll) add_cd_file(TARGET olecli32 DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/samsrv/database.c b/dll/win32/samsrv/database.c index 512e7e1f8a2..7887f613db7 100644 --- a/dll/win32/samsrv/database.c +++ b/dll/win32/samsrv/database.c @@ -8,6 +8,8 @@ #include "samsrv.h" +#include + /* GLOBALS *****************************************************************/ static HANDLE SamKeyHandle = NULL; diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index b63feb46c44..923f16c2b2c 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -25,6 +25,8 @@ #include #include +#include + #include "rpc_private.h" DWORD diff --git a/dll/win32/setupapi/devinst.c b/dll/win32/setupapi/devinst.c index a20c96b9c07..c3d4a68f977 100644 --- a/dll/win32/setupapi/devinst.c +++ b/dll/win32/setupapi/devinst.c @@ -21,6 +21,8 @@ #include "setupapi_private.h" +#include + /* Unicode constants */ static const WCHAR BackSlash[] = {'\\',0}; static const WCHAR DateFormat[] = {'%','u','-','%','u','-','%','u',0}; diff --git a/modules/rostests/apitests/apphelp/apphelp.c b/modules/rostests/apitests/apphelp/apphelp.c index 7f4151289b9..13a52ca0f6f 100644 --- a/modules/rostests/apitests/apphelp/apphelp.c +++ b/modules/rostests/apitests/apphelp/apphelp.c @@ -24,6 +24,8 @@ #include #include +#include + #include "wine/test.h" #include "apphelp_apitest.h" @@ -299,7 +301,7 @@ static struct "PROBLEMSEVERITY", "LANGID", "VER_LANGUAGE", "InvalidTag", "ENGINE", "HTMLHELPID", "INDEX_FLAGS", "FLAGS", "DATA_VALUETYPE", "DATA_DWORD", "LAYER_TAGID", "MSI_TRANSFORM_TAGID", "LINKER_VERSION", "LINK_DATE", "UPTO_LINK_DATE", "OS_SERVICE_PACK", "FLAG_TAGID", "RUNTIME_PLATFORM", "OS_SKU", "OS_PLATFORM", "APP_NAME_RC_ID", "VENDOR_NAME_RC_ID", "SUMMARY_MSG_RC_ID", "VISTA_SKU", - "DESCRIPTION_RC_ID", "PARAMETER1_RC_ID", "InvalidTag", "InvalidTag", "InvalidTag", "InvalidTag", "InvalidTag", "InvalidTag", + "DESCRIPTION_RC_ID", "PARAMETER1_RC_ID", "InvalidTag", "InvalidTag", "InvalidTag", "InvalidTag", "InvalidTag", "InvalidTag", "CONTEXT_TAGID", "EXE_WRAPPER", "URL_ID", NULL } }, diff --git a/modules/rostests/apitests/apphelp/db.cpp b/modules/rostests/apitests/apphelp/db.cpp index 4f6f3b76423..a96fb463901 100644 --- a/modules/rostests/apitests/apphelp/db.cpp +++ b/modules/rostests/apitests/apphelp/db.cpp @@ -22,6 +22,8 @@ #include #include +#include + #include "wine/test.h" #include "apphelp_apitest.h" @@ -1081,7 +1083,7 @@ static void test_GetDatabaseInformation(PDB pdb) ok(pInfo[1].dwSomething == 0xdededede, "Cookie1 corrupt: 0x%x\n", pInfo[1].dwSomething); ok(pInfo[1].dwMajor == 0xdededede, "Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor); } - + } free(pInfo); } @@ -1185,7 +1187,7 @@ static BOOL IsUserAdmin() { BOOL Result; SID_IDENTIFIER_AUTHORITY NtAuthority = { SECURITY_NT_AUTHORITY }; - PSID AdministratorsGroup; + PSID AdministratorsGroup; Result = AllocateAndInitializeSid(&NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, @@ -1196,7 +1198,7 @@ static BOOL IsUserAdmin() { if (!CheckTokenMembership( NULL, AdministratorsGroup, &Result)) Result = FALSE; - FreeSid(AdministratorsGroup); + FreeSid(AdministratorsGroup); } return Result; diff --git a/modules/rostests/apitests/apphelp/env.c b/modules/rostests/apitests/apphelp/env.c index 74e7d3b5dc1..26fcadbb611 100644 --- a/modules/rostests/apitests/apphelp/env.c +++ b/modules/rostests/apitests/apphelp/env.c @@ -21,6 +21,8 @@ #include "wine/test.h" +#include + #include "apphelp_apitest.h" typedef void* HSDB; diff --git a/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt b/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt index 34da6e3e4bc..46df43a266a 100644 --- a/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt +++ b/modules/rostests/apitests/compiler/ms/seh/CMakeLists.txt @@ -12,6 +12,7 @@ foreach(num RANGE 10 58) endforeach() add_library(ms_seh_test ${SOURCE}) +target_link_libraries(ms_seh_test pseh) add_dependencies(ms_seh_test psdk) if(MSVC) diff --git a/modules/rostests/apitests/gdi32/AddFontResourceEx.c b/modules/rostests/apitests/gdi32/AddFontResourceEx.c index 9448a6ff1c6..c65a00090d4 100644 --- a/modules/rostests/apitests/gdi32/AddFontResourceEx.c +++ b/modules/rostests/apitests/gdi32/AddFontResourceEx.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + void Test_AddFontResourceExW() { WCHAR szFileName[MAX_PATH]; diff --git a/modules/rostests/apitests/gdi32/CreateDIBitmap.c b/modules/rostests/apitests/gdi32/CreateDIBitmap.c index cee2bb476d6..cc11cab28c5 100644 --- a/modules/rostests/apitests/gdi32/CreateDIBitmap.c +++ b/modules/rostests/apitests/gdi32/CreateDIBitmap.c @@ -9,6 +9,8 @@ #include "init.h" +#include + #define CBM_CREATDIB 2 #define INVALID_POINTER ((PVOID)(ULONG_PTR)0xC0000000C0000000ULL) diff --git a/modules/rostests/apitests/gdi32/ExtCreatePen.c b/modules/rostests/apitests/gdi32/ExtCreatePen.c index d565ad9306e..b82c34b8f23 100644 --- a/modules/rostests/apitests/gdi32/ExtCreatePen.c +++ b/modules/rostests/apitests/gdi32/ExtCreatePen.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + #define ok_lasterror(err) \ ok(GetLastError() == err, "expected last error " #err " but got 0x%lx\n", GetLastError()); diff --git a/modules/rostests/apitests/gdi32/GetObject.c b/modules/rostests/apitests/gdi32/GetObject.c index df2a87170f7..6cd0d1c8ac5 100644 --- a/modules/rostests/apitests/gdi32/GetObject.c +++ b/modules/rostests/apitests/gdi32/GetObject.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + #define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL) void diff --git a/modules/rostests/apitests/gdi32/SetBrushOrgEx.c b/modules/rostests/apitests/gdi32/SetBrushOrgEx.c index e708fef180d..9d510ab4ce8 100644 --- a/modules/rostests/apitests/gdi32/SetBrushOrgEx.c +++ b/modules/rostests/apitests/gdi32/SetBrushOrgEx.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + void Test_Set(ULONG ulLine, HDC hdc, INT x, INT y, LPPOINT ppt, BOOL bExp, DWORD dwErrExp) { BOOL bResult; diff --git a/modules/rostests/apitests/kernel32/FLS.c b/modules/rostests/apitests/kernel32/FLS.c index 712a87403e8..44241b1e5a8 100644 --- a/modules/rostests/apitests/kernel32/FLS.c +++ b/modules/rostests/apitests/kernel32/FLS.c @@ -9,6 +9,8 @@ #include #include +#include + /* XP does not have these functions */ static DWORD (WINAPI *pFlsAlloc)(PFLS_CALLBACK_FUNCTION); static BOOL (WINAPI *pFlsFree)(DWORD); diff --git a/modules/rostests/apitests/kernel32/SystemFirmware.c b/modules/rostests/apitests/kernel32/SystemFirmware.c index 47ef3a33bac..8a1ee03af4e 100644 --- a/modules/rostests/apitests/kernel32/SystemFirmware.c +++ b/modules/rostests/apitests/kernel32/SystemFirmware.c @@ -8,6 +8,8 @@ #include "precomp.h" +#include + static UINT (WINAPI * pEnumSystemFirmwareTables)(DWORD, PVOID, DWORD); static UINT (WINAPI * pGetSystemFirmwareTable)(DWORD, DWORD, PVOID, DWORD); diff --git a/modules/rostests/apitests/localspl/dll/fpEnumPrinters.c b/modules/rostests/apitests/localspl/dll/fpEnumPrinters.c index b3d1625687d..346682ca946 100644 --- a/modules/rostests/apitests/localspl/dll/fpEnumPrinters.c +++ b/modules/rostests/apitests/localspl/dll/fpEnumPrinters.c @@ -15,6 +15,8 @@ #include #include +#include + #include "../localspl_apitest.h" #include diff --git a/modules/rostests/apitests/ntdll/LdrEnumResources.c b/modules/rostests/apitests/ntdll/LdrEnumResources.c index e20cfd2bef5..1e0a0787f08 100644 --- a/modules/rostests/apitests/ntdll/LdrEnumResources.c +++ b/modules/rostests/apitests/ntdll/LdrEnumResources.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + typedef struct _TEST_RESOURCES { IMAGE_RESOURCE_DIRECTORY TypeDirectory; diff --git a/modules/rostests/apitests/ntdll/NtAllocateVirtualMemory.c b/modules/rostests/apitests/ntdll/NtAllocateVirtualMemory.c index aae94052e6b..235eaaf0095 100644 --- a/modules/rostests/apitests/ntdll/NtAllocateVirtualMemory.c +++ b/modules/rostests/apitests/ntdll/NtAllocateVirtualMemory.c @@ -10,6 +10,8 @@ #include "precomp.h" +#include + static PVOID Allocations[4096] = { NULL }; static ULONG CurrentAllocation = 0; diff --git a/modules/rostests/apitests/ntdll/NtMapViewOfSection.c b/modules/rostests/apitests/ntdll/NtMapViewOfSection.c index a191126df20..8723696c924 100644 --- a/modules/rostests/apitests/ntdll/NtMapViewOfSection.c +++ b/modules/rostests/apitests/ntdll/NtMapViewOfSection.c @@ -8,6 +8,8 @@ #include "precomp.h" +#include + void Test_PageFileSection(void) { diff --git a/modules/rostests/apitests/ntdll/RtlAllocateHeap.c b/modules/rostests/apitests/ntdll/RtlAllocateHeap.c index 6a327bb09f0..af3a8a7aecd 100644 --- a/modules/rostests/apitests/ntdll/RtlAllocateHeap.c +++ b/modules/rostests/apitests/ntdll/RtlAllocateHeap.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + PVOID Buffers[0x100]; START_TEST(RtlAllocateHeap) diff --git a/modules/rostests/apitests/ntdll/RtlBitmap.c b/modules/rostests/apitests/ntdll/RtlBitmap.c index 3b224be1e66..0c6bc7d59e5 100644 --- a/modules/rostests/apitests/ntdll/RtlBitmap.c +++ b/modules/rostests/apitests/ntdll/RtlBitmap.c @@ -2,6 +2,8 @@ #include "precomp.h" #include +#include + static BOOL IsBroken = FALSE; void diff --git a/modules/rostests/apitests/ntdll/RtlMultipleAllocateHeap.c b/modules/rostests/apitests/ntdll/RtlMultipleAllocateHeap.c index b2eb3132afa..1ae645facf5 100644 --- a/modules/rostests/apitests/ntdll/RtlMultipleAllocateHeap.c +++ b/modules/rostests/apitests/ntdll/RtlMultipleAllocateHeap.c @@ -6,6 +6,8 @@ */ #include "precomp.h" +#include + typedef ULONG (NTAPI *FN_RtlMultipleAllocateHeap)(IN PVOID, IN ULONG, IN SIZE_T, IN ULONG, OUT PVOID *); typedef ULONG (NTAPI *FN_RtlMultipleFreeHeap)(IN PVOID, IN ULONG, IN ULONG, OUT PVOID *); diff --git a/modules/rostests/apitests/ntdll/StackOverflow.c b/modules/rostests/apitests/ntdll/StackOverflow.c index 175142d01a3..1c3007079ee 100644 --- a/modules/rostests/apitests/ntdll/StackOverflow.c +++ b/modules/rostests/apitests/ntdll/StackOverflow.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + #ifdef _MSC_VER #pragma warning(disable : 4717) // disable warning about recursive function #endif diff --git a/modules/rostests/apitests/ntdll/load_notifications.c b/modules/rostests/apitests/ntdll/load_notifications.c index 8543f2f478a..6fca52939a5 100644 --- a/modules/rostests/apitests/ntdll/load_notifications.c +++ b/modules/rostests/apitests/ntdll/load_notifications.c @@ -7,6 +7,8 @@ #include "precomp.h" +#include + WCHAR dllpath[MAX_PATH]; LONG g_TlsCalled = 0; diff --git a/modules/rostests/apitests/sdk/delayimp.cpp b/modules/rostests/apitests/sdk/delayimp.cpp index ca8c76e1ffe..7073f001932 100644 --- a/modules/rostests/apitests/sdk/delayimp.cpp +++ b/modules/rostests/apitests/sdk/delayimp.cpp @@ -20,6 +20,8 @@ #include #include +#include + /* Compatibility with the MS defines */ #ifndef FACILITY_VISUALCPP @@ -198,7 +200,7 @@ FARPROC WINAPI DliHook(unsigned dliNotify, PDelayLoadInfo pdli) g_VersionDll = LoadLibraryA("version.dll"); return (FARPROC)1; } - + } else if (dliNotify == dliNotePreGetProcAddress) { @@ -482,7 +484,7 @@ START_TEST(delayimp) ok(err == MMSYSERR_INVALHANDLE, "Expected err to be MMSYSERR_INVALHANDLE, was 0x%lx\n", err); CheckDliDone(); ok(g_BreakFunctionName == false, "Expected the functionname to be changed\n"); - + /* Make the LoadLib fail, manually load the library in the Failure Hook, Respond to the dliNotePreGetProcAddress with an alternate function address */ SetExpectedDli(g_sfc_key); diff --git a/modules/rostests/apitests/shlwapi/PathFindOnPath.c b/modules/rostests/apitests/shlwapi/PathFindOnPath.c index 9a4ba21ed6b..4b4f67d67b2 100644 --- a/modules/rostests/apitests/shlwapi/PathFindOnPath.c +++ b/modules/rostests/apitests/shlwapi/PathFindOnPath.c @@ -20,6 +20,8 @@ #include #include +#include + #define EF_FULLPATH 1 #define EF_TESTDATA 2 #define EF_WIN_DIR 4 diff --git a/modules/rostests/apitests/shlwapi/SHAreIconsEqual.c b/modules/rostests/apitests/shlwapi/SHAreIconsEqual.c index 27592325c79..efaaea4d688 100644 --- a/modules/rostests/apitests/shlwapi/SHAreIconsEqual.c +++ b/modules/rostests/apitests/shlwapi/SHAreIconsEqual.c @@ -9,6 +9,8 @@ #include #include "resource.h" +#include + static BOOL (WINAPI *pSHAreIconsEqual)(HICON hIcon1, HICON hIcon2); static const char* names[] = diff --git a/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c b/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c index 0eac5b04db6..5aeef6de517 100644 --- a/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c +++ b/modules/rostests/apitests/shlwapi/SHLoadIndirectString.c @@ -9,6 +9,8 @@ #include #include "resource.h" +#include + static void execute_test(LPCWSTR DllFile) { WCHAR DllBuffer[MAX_PATH + 20]; diff --git a/modules/rostests/apitests/spoolss/ReallocSplStr.c b/modules/rostests/apitests/spoolss/ReallocSplStr.c index 161d07070a9..a19aab3acbb 100644 --- a/modules/rostests/apitests/spoolss/ReallocSplStr.c +++ b/modules/rostests/apitests/spoolss/ReallocSplStr.c @@ -12,6 +12,8 @@ #include #include +#include + START_TEST(ReallocSplStr) { const WCHAR wszTestString1[] = L"Test"; diff --git a/modules/rostests/winetests/kernel32/CMakeLists.txt b/modules/rostests/winetests/kernel32/CMakeLists.txt index d652970ff98..c46d3fdf669 100644 --- a/modules/rostests/winetests/kernel32/CMakeLists.txt +++ b/modules/rostests/winetests/kernel32/CMakeLists.txt @@ -55,6 +55,7 @@ if(USE_CLANG_CL OR (NOT MSVC)) endif() set_module_type(kernel32_winetest win32cui) +target_link_libraries(kernel32_winetest pseh) add_importlibs(kernel32_winetest user32 advapi32 msvcrt kernel32 ntdll) add_pch(kernel32_winetest precomp.h "${PCH_SKIP_SOURCE}") add_rostests_file(TARGET kernel32_winetest) diff --git a/modules/rostests/winetests/ntdll/CMakeLists.txt b/modules/rostests/winetests/ntdll/CMakeLists.txt index 21b6b7bdc97..33863166474 100644 --- a/modules/rostests/winetests/ntdll/CMakeLists.txt +++ b/modules/rostests/winetests/ntdll/CMakeLists.txt @@ -36,6 +36,8 @@ add_executable(ntdll_winetest ${SOURCE} ${PCH_SKIP_SOURCE}) +target_link_libraries(ntdll_winetest pseh) + if(USE_CLANG_CL OR (NOT MSVC)) target_compile_options(ntdll_winetest PRIVATE "-Wno-format") endif() diff --git a/sdk/lib/atl/CMakeLists.txt b/sdk/lib/atl/CMakeLists.txt index 3a0fb3ce0dc..9fb5d548228 100644 --- a/sdk/lib/atl/CMakeLists.txt +++ b/sdk/lib/atl/CMakeLists.txt @@ -9,3 +9,5 @@ target_include_directories(atl_classes INTERFACE target_compile_definitions(atl_classes INTERFACE "$<$,$>>>:_ATL_NO_EXCEPTIONS>") + +target_link_libraries(atl_classes INTERFACE pseh) diff --git a/sdk/lib/atl/atlcom.h b/sdk/lib/atl/atlcom.h index 544de73244c..c9d92edbd9c 100644 --- a/sdk/lib/atl/atlcom.h +++ b/sdk/lib/atl/atlcom.h @@ -22,6 +22,7 @@ #pragma once #include // for GUID_NULL +#include namespace ATL { diff --git a/sdk/lib/crt/crt.cmake b/sdk/lib/crt/crt.cmake index 3997ea778a9..6a1111789d7 100644 --- a/sdk/lib/crt/crt.cmake +++ b/sdk/lib/crt/crt.cmake @@ -603,7 +603,7 @@ if(USE_CLANG_CL) endif() add_library(crt ${CRT_SOURCE} ${CRT_WINE_SOURCE} ${crt_asm}) -target_link_libraries(crt chkstk) +target_link_libraries(crt chkstk ${PSEH_LIB}) target_compile_definitions(crt PRIVATE __MINGW_IMPORT=extern USE_MSVCRT_PREFIX diff --git a/sdk/lib/drivers/copysup/CMakeLists.txt b/sdk/lib/drivers/copysup/CMakeLists.txt index c84d41ed97d..fb009964639 100644 --- a/sdk/lib/drivers/copysup/CMakeLists.txt +++ b/sdk/lib/drivers/copysup/CMakeLists.txt @@ -4,4 +4,5 @@ list(APPEND SOURCE copysup.c) add_library(copysup ${SOURCE}) +target_link_libraries(copysup PRIVATE pseh) add_dependencies(copysup bugcodes xdk) diff --git a/sdk/lib/drivers/rdbsslib/CMakeLists.txt b/sdk/lib/drivers/rdbsslib/CMakeLists.txt index 7b6ec545500..5c1b9005f8c 100644 --- a/sdk/lib/drivers/rdbsslib/CMakeLists.txt +++ b/sdk/lib/drivers/rdbsslib/CMakeLists.txt @@ -7,4 +7,5 @@ list(APPEND SOURCE rdbss.c) add_library(rdbsslib ${SOURCE}) +target_link_libraries(rdbsslib PRIVATE pseh) add_dependencies(rdbsslib bugcodes xdk) diff --git a/sdk/lib/drivers/rxce/CMakeLists.txt b/sdk/lib/drivers/rxce/CMakeLists.txt index 38168bf6022..905c08b8136 100644 --- a/sdk/lib/drivers/rxce/CMakeLists.txt +++ b/sdk/lib/drivers/rxce/CMakeLists.txt @@ -6,4 +6,5 @@ list(APPEND SOURCE rxce.c) add_library(rxce ${SOURCE}) +target_link_libraries(rxce PRIVATE pseh) add_dependencies(rxce bugcodes xdk) diff --git a/sdk/lib/rtl/CMakeLists.txt b/sdk/lib/rtl/CMakeLists.txt index 1fe48a7817c..c2b2e5d1025 100644 --- a/sdk/lib/rtl/CMakeLists.txt +++ b/sdk/lib/rtl/CMakeLists.txt @@ -112,6 +112,7 @@ endif() add_asm_files(rtl_asm ${ASM_SOURCE}) add_library(rtl ${SOURCE} ${rtl_asm}) +target_link_libraries(rtl PRIVATE pseh) add_pch(rtl rtl.h SOURCE) add_dependencies(rtl psdk asm) @@ -124,3 +125,4 @@ list(APPEND SOURCE_VISTA add_library(rtl_vista ${SOURCE_VISTA}) add_pch(rtl_vista rtl_vista.h SOURCE_VISTA) add_dependencies(rtl_vista psdk) +target_link_libraries(rtl_vista PRIVATE pseh) diff --git a/win32ss/gdi/gdi32/objects/bitmap.c b/win32ss/gdi/gdi32/objects/bitmap.c index 3e56194ce95..91e8a0be9ee 100644 --- a/win32ss/gdi/gdi32/objects/bitmap.c +++ b/win32ss/gdi/gdi32/objects/bitmap.c @@ -1,5 +1,7 @@ #include +#include + #define NDEBUG #include diff --git a/win32ss/gdi/gdi32/wine/CMakeLists.txt b/win32ss/gdi/gdi32/wine/CMakeLists.txt index 63e139cd8c9..4f70a336d05 100644 --- a/win32ss/gdi/gdi32/wine/CMakeLists.txt +++ b/win32ss/gdi/gdi32/wine/CMakeLists.txt @@ -23,4 +23,5 @@ list(APPEND SOURCE rosglue.c) add_library(winegdi ${SOURCE}) +target_link_libraries(winegdi PRIVATE pseh) add_dependencies(winegdi psdk) diff --git a/win32ss/printing/base/winspool/utils.c b/win32ss/printing/base/winspool/utils.c index 3fa4a37ef2d..1128f3d801e 100644 --- a/win32ss/printing/base/winspool/utils.c +++ b/win32ss/printing/base/winspool/utils.c @@ -9,6 +9,8 @@ #include #include +#include + #define MAX_GETPRINTER_SIZE 4096 - MAX_PATH typedef void (WINAPI *PPfpSHChangeNotify)(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2); @@ -160,7 +162,7 @@ IntProtectHandle( HANDLE hSpooler, BOOL Close ) // 2 : Close and/or shared // 1 : Failed Handle // 0 : In use. - return Ret; + return Ret; } // // This one too. diff --git a/win32ss/user/winsrv/consrv.cmake b/win32ss/user/winsrv/consrv.cmake index 48fb96d2de2..d2ef3a2b5ec 100644 --- a/win32ss/user/winsrv/consrv.cmake +++ b/win32ss/user/winsrv/consrv.cmake @@ -53,6 +53,7 @@ else() endif() add_library(consrv ${CONSRV_SOURCE}) +target_link_libraries(consrv pseh) add_dependencies(consrv psdk) add_pch(consrv consrv/consrv.h CONSRV_SOURCE) #add_object_library(consrv ${CONSRV_SOURCE}) diff --git a/win32ss/user/winsrv/usersrv.cmake b/win32ss/user/winsrv/usersrv.cmake index e7cbb1bae13..8db138e5a27 100644 --- a/win32ss/user/winsrv/usersrv.cmake +++ b/win32ss/user/winsrv/usersrv.cmake @@ -10,6 +10,7 @@ list(APPEND USERSRV_SOURCE usersrv/usersrv.h) add_library(usersrv ${USERSRV_SOURCE}) +target_link_libraries(usersrv pseh) add_dependencies(usersrv xdk) add_pch(usersrv usersrv/usersrv.h USERSRV_SOURCE) #add_object_library(usersrv ${USERSRV_SOURCE})