[REACTOS] Explicitly link against pseh & include pseh headers in a few places

This commit is contained in:
Jérôme Gardou 2021-04-22 17:28:52 +02:00 committed by Jérôme Gardou
parent 37bc01f42b
commit e470b58376
50 changed files with 103 additions and 23 deletions

View file

@ -24,6 +24,8 @@
#include <shlguid.h>
#include <shobjidl.h>
#include <pseh/pseh2.h>
#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
}
},

View file

@ -22,6 +22,8 @@
#include <stdio.h>
#include <initguid.h>
#include <pseh/pseh2.h>
#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;

View file

@ -21,6 +21,8 @@
#include "wine/test.h"
#include <pseh/pseh2.h>
#include "apphelp_apitest.h"
typedef void* HSDB;

View file

@ -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)

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
void Test_AddFontResourceExW()
{
WCHAR szFileName[MAX_PATH];

View file

@ -9,6 +9,8 @@
#include "init.h"
#include <pseh/pseh2.h>
#define CBM_CREATDIB 2
#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xC0000000C0000000ULL)

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
#define ok_lasterror(err) \
ok(GetLastError() == err, "expected last error " #err " but got 0x%lx\n", GetLastError());

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
void

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
void Test_Set(ULONG ulLine, HDC hdc, INT x, INT y, LPPOINT ppt, BOOL bExp, DWORD dwErrExp)
{
BOOL bResult;

View file

@ -9,6 +9,8 @@
#include <ndk/pstypes.h>
#include <ndk/rtlfuncs.h>
#include <pseh/pseh2.h>
/* XP does not have these functions */
static DWORD (WINAPI *pFlsAlloc)(PFLS_CALLBACK_FUNCTION);
static BOOL (WINAPI *pFlsFree)(DWORD);

View file

@ -8,6 +8,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
static UINT (WINAPI * pEnumSystemFirmwareTables)(DWORD, PVOID, DWORD);
static UINT (WINAPI * pGetSystemFirmwareTable)(DWORD, DWORD, PVOID, DWORD);

View file

@ -15,6 +15,8 @@
#include <winspool.h>
#include <winsplp.h>
#include <pseh/pseh2.h>
#include "../localspl_apitest.h"
#include <spoolss.h>

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
typedef struct _TEST_RESOURCES
{
IMAGE_RESOURCE_DIRECTORY TypeDirectory;

View file

@ -10,6 +10,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
static PVOID Allocations[4096] = { NULL };
static ULONG CurrentAllocation = 0;

View file

@ -8,6 +8,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
void
Test_PageFileSection(void)
{

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
PVOID Buffers[0x100];
START_TEST(RtlAllocateHeap)

View file

@ -2,6 +2,8 @@
#include "precomp.h"
#include <versionhelpers.h>
#include <pseh/pseh2.h>
static BOOL IsBroken = FALSE;
void

View file

@ -6,6 +6,8 @@
*/
#include "precomp.h"
#include <pseh/pseh2.h>
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 *);

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
#ifdef _MSC_VER
#pragma warning(disable : 4717) // disable warning about recursive function
#endif

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
WCHAR dllpath[MAX_PATH];
LONG g_TlsCalled = 0;

View file

@ -20,6 +20,8 @@
#include <imagehlp.h>
#include <mmddk.h>
#include <pseh/pseh2.h>
/* 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);

View file

@ -20,6 +20,8 @@
#include <shlwapi.h>
#include <assert.h>
#include <pseh/pseh2.h>
#define EF_FULLPATH 1
#define EF_TESTDATA 2
#define EF_WIN_DIR 4

View file

@ -9,6 +9,8 @@
#include <shlwapi.h>
#include "resource.h"
#include <pseh/pseh2.h>
static BOOL (WINAPI *pSHAreIconsEqual)(HICON hIcon1, HICON hIcon2);
static const char* names[] =

View file

@ -9,6 +9,8 @@
#include <shlwapi.h>
#include "resource.h"
#include <pseh/pseh2.h>
static void execute_test(LPCWSTR DllFile)
{
WCHAR DllBuffer[MAX_PATH + 20];

View file

@ -12,6 +12,8 @@
#include <winbase.h>
#include <spoolss.h>
#include <pseh/pseh2.h>
START_TEST(ReallocSplStr)
{
const WCHAR wszTestString1[] = L"Test";

View file

@ -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)

View file

@ -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()