From 5e7668c2cd7ef9d017536f1e2e4ec89708f5b74f Mon Sep 17 00:00:00 2001
From: pg9182 <96569817+pg9182@users.noreply.github.com>
Date: Mon, 8 Aug 2022 06:12:11 -0400
Subject: Fix most clang/mingw issues (#226)
- Fix include case.
- Replace MSVC-specific align with standard alignas.
- Type fixes.
- Delete operator noexcept.
- A few other minor issues.
- clang-format everything.
- Use c++20 instead of c++17.
- Rewrite ERROR macro for launcher_wsock32_proxy.
- Use a plain ifstream for the audio.cpp wavStream.
Note: When compiling with clang, you'll need -municode.
Related to #212.
---
LauncherInjector/LauncherInjector.vcxproj | 4 +-
LauncherInjector/main.cpp | 10 +-
NorthstarDedicatedTest/ExploitFixes.cpp | 8 +-
NorthstarDedicatedTest/NSMem.h | 6 +-
.../NorthstarDedicatedTest.vcxproj | 4 +-
NorthstarDedicatedTest/audio.cpp | 10 +-
NorthstarDedicatedTest/bansystem.cpp | 3 +-
NorthstarDedicatedTest/clientvideooverrides.cpp | 7 +-
NorthstarDedicatedTest/convar.cpp | 2 +
NorthstarDedicatedTest/dedicatedmaterialsystem.cpp | 3 +-
NorthstarDedicatedTest/dllmain.cpp | 8 +-
NorthstarDedicatedTest/filesystem.cpp | 16 +-
NorthstarDedicatedTest/hooks.cpp | 16 +-
NorthstarDedicatedTest/hookutils.h | 3 +-
NorthstarDedicatedTest/logging.cpp | 5 +-
NorthstarDedicatedTest/masterserver.h | 4 +-
NorthstarDedicatedTest/maxplayers.cpp | 6 +-
NorthstarDedicatedTest/memalloc.cpp | 4 +-
NorthstarDedicatedTest/memalloc.h | 2 +-
NorthstarDedicatedTest/pch.h | 4 +-
NorthstarDedicatedTest/rpakfilesystem.cpp | 16 +-
NorthstarDedicatedTest/scriptjson.cpp | 4 +-
NorthstarDedicatedTest/serverchathooks.cpp | 2 +-
NorthstarDedicatedTest/sourceinterface.cpp | 8 +-
NorthstarDedicatedTest/squirrel.cpp | 4 +-
NorthstarDedicatedTest/squirrel.h | 24 +--
loader_launcher_proxy/Memory.cpp | 11 +-
loader_launcher_proxy/Memory.h | 36 ++--
loader_launcher_proxy/dllmain.cpp | 229 +++++++++++----------
loader_launcher_proxy/framework.h | 4 +-
.../loader_launcher_proxy.vcxproj | 4 +-
loader_launcher_proxy/pch.h | 2 +-
loader_wsock32_proxy/dllmain.cpp | 64 ++++--
loader_wsock32_proxy/hookutils.cpp | 91 ++++----
loader_wsock32_proxy/loader.cpp | 32 ++-
loader_wsock32_proxy/loader_wsock32_proxy.vcxproj | 4 +-
loader_wsock32_proxy/pch.h | 4 +-
37 files changed, 377 insertions(+), 287 deletions(-)
diff --git a/LauncherInjector/LauncherInjector.vcxproj b/LauncherInjector/LauncherInjector.vcxproj
index 8870c732..ae49b165 100644
--- a/LauncherInjector/LauncherInjector.vcxproj
+++ b/LauncherInjector/LauncherInjector.vcxproj
@@ -56,7 +56,7 @@
true
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- stdcpp17
+ stdcpp20
/F8000000 %(AdditionalOptions)
@@ -74,7 +74,7 @@
true
NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
- stdcpp17
+ stdcpp20
/F8000000 %(AdditionalOptions)
diff --git a/LauncherInjector/main.cpp b/LauncherInjector/main.cpp
index 04aadf03..1311759d 100644
--- a/LauncherInjector/main.cpp
+++ b/LauncherInjector/main.cpp
@@ -1,10 +1,10 @@
#define WIN32_LEAN_AND_MEAN
-#include
-#include
+#include
+#include
#include
#include
#include
-#include
+#include
#include
namespace fs = std::filesystem;
@@ -225,7 +225,7 @@ bool ShouldLoadNorthstar(int argc, char* argv[])
std::stringstream runNorthstarFileBuffer;
runNorthstarFileBuffer << runNorthstarFile.rdbuf();
runNorthstarFile.close();
- if (runNorthstarFileBuffer.str()._Starts_with("0"))
+ if (runNorthstarFileBuffer.str().starts_with("0"))
loadNorthstar = false;
}
return loadNorthstar;
@@ -236,7 +236,7 @@ bool LoadNorthstar()
FARPROC Hook_Init = nullptr;
{
swprintf_s(buffer, L"%s\\Northstar.dll", exePath);
- hHookModule = LoadLibraryExW(buffer, 0i64, 8u);
+ hHookModule = LoadLibraryExW(buffer, 0, 8u);
if (hHookModule)
Hook_Init = GetProcAddress(hHookModule, "InitialiseNorthstar");
if (!hHookModule || Hook_Init == nullptr)
diff --git a/NorthstarDedicatedTest/ExploitFixes.cpp b/NorthstarDedicatedTest/ExploitFixes.cpp
index 2f4e2b5c..31fa349a 100644
--- a/NorthstarDedicatedTest/ExploitFixes.cpp
+++ b/NorthstarDedicatedTest/ExploitFixes.cpp
@@ -204,7 +204,7 @@ KHOOK(ReadUsercmd, ("server.dll", "4C 89 44 24 ? 53 55 56 57"), void, __fastcall
oReadUsercmd(buf, pCmd_move, pCmd_from);
// Now let's make sure the CMD we read isnt messed up to prevent numerous exploits (including server crashing)
- struct __declspec(align(4)) SV_CUserCmd
+ struct alignas(4) SV_CUserCmd
{
DWORD command_number;
DWORD tick_count;
@@ -291,7 +291,11 @@ KHOOK(
static void* targetRetAddr = NSMem::PatternScan("engine.dll", "84 C0 75 2C 49 8B 16");
+#ifdef _MSC_VER
if (_ReturnAddress() == targetRetAddr)
+#else
+ if (__builtin_return_address(0) == targetRetAddr)
+#endif
{
if (!ExploitFixes_UTF8Parser::CheckValid(a1, a2, strData))
{
@@ -546,4 +550,4 @@ void ExploitFixes::LoadCallback_Full(HMODULE baseAddress)
HookEnabler hook;
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x2a8a50, &GetEntByIndexHook, reinterpret_cast(&GetEntByIndex));
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/NSMem.h b/NorthstarDedicatedTest/NSMem.h
index 84bb93db..9b1f9103 100644
--- a/NorthstarDedicatedTest/NSMem.h
+++ b/NorthstarDedicatedTest/NSMem.h
@@ -44,7 +44,7 @@ namespace NSMem
}
else
{
- assert(false, "Failed to parse invalid hex string.");
+ assert(false);
val = -1;
}
@@ -188,6 +188,6 @@ struct KHook
#define KHOOK(name, funcPatternInfo, returnType, convention, args) \
returnType convention hk##name args; \
auto o##name = (returnType(convention*) args)0; \
- KHook k##name = KHook(KHookPatternInfo funcPatternInfo, &hk##name, (void**)&o##name); \
+ KHook k##name = KHook(KHookPatternInfo funcPatternInfo, reinterpret_cast(&hk##name), (void**)&o##name); \
returnType convention hk##name args
-#pragma endregion
\ No newline at end of file
+#pragma endregion
diff --git a/NorthstarDedicatedTest/NorthstarDedicatedTest.vcxproj b/NorthstarDedicatedTest/NorthstarDedicatedTest.vcxproj
index 0bb2fe02..06ca7af4 100644
--- a/NorthstarDedicatedTest/NorthstarDedicatedTest.vcxproj
+++ b/NorthstarDedicatedTest/NorthstarDedicatedTest.vcxproj
@@ -59,7 +59,7 @@
true
Use
pch.h
- stdcpp17
+ stdcpp20
$(ProjectDir)include;%(AdditionalIncludeDirectories)
@@ -86,7 +86,7 @@
true
Use
pch.h
- stdcpp17
+ stdcpp20
$(ProjectDir)include;%(AdditionalIncludeDirectories)
MultiThreadedDLL
diff --git a/NorthstarDedicatedTest/audio.cpp b/NorthstarDedicatedTest/audio.cpp
index 0b65670f..ed30d01b 100644
--- a/NorthstarDedicatedTest/audio.cpp
+++ b/NorthstarDedicatedTest/audio.cpp
@@ -194,7 +194,7 @@ EventOverrideData::EventOverrideData(const std::string& data, const fs::path& pa
std::string pathString = file.path().string();
// Open the file.
- std::basic_ifstream wavStream(pathString, std::ios::binary);
+ std::ifstream wavStream(pathString, std::ios::binary);
if (wavStream.fail())
{
@@ -219,7 +219,7 @@ EventOverrideData::EventOverrideData(const std::string& data, const fs::path& pa
[pathString, fileSize, data]
{
std::shared_lock lock(g_CustomAudioManager.m_loadingMutex);
- std::basic_ifstream wavStream(pathString, std::ios::binary);
+ std::ifstream wavStream(pathString, std::ios::binary);
// would be weird if this got hit, since it would've worked previously
if (wavStream.fail())
@@ -230,9 +230,9 @@ EventOverrideData::EventOverrideData(const std::string& data, const fs::path& pa
// read from after the header first to preserve the empty header, then read the header last
wavStream.seekg(sizeof(EMPTY_WAVE), std::ios::beg);
- wavStream.read(&data[sizeof(EMPTY_WAVE)], fileSize - sizeof(EMPTY_WAVE));
+ wavStream.read(reinterpret_cast(&data[sizeof(EMPTY_WAVE)]), fileSize - sizeof(EMPTY_WAVE));
wavStream.seekg(0, std::ios::beg);
- wavStream.read(data, sizeof(EMPTY_WAVE));
+ wavStream.read(reinterpret_cast(data), sizeof(EMPTY_WAVE));
wavStream.close();
spdlog::info("Finished async read of audio sample {}", pathString);
@@ -512,4 +512,4 @@ void InitialiseMilesAudioHooks(HMODULE baseAddress)
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x57DAD0, &MilesLog_Hook, reinterpret_cast(&MilesLog_Original));
MilesStopAll = (MilesStopAll_Type)((char*)baseAddress + 0x580850);
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/bansystem.cpp b/NorthstarDedicatedTest/bansystem.cpp
index 9c2507fd..9333d844 100644
--- a/NorthstarDedicatedTest/bansystem.cpp
+++ b/NorthstarDedicatedTest/bansystem.cpp
@@ -1,4 +1,3 @@
-#pragma once
#include "pch.h"
#include "bansystem.h"
#include "serverauthentication.h"
@@ -103,4 +102,4 @@ void InitialiseBanSystem(HMODULE baseAddress)
RegisterConCommand("ban", BanPlayerCommand, "bans a given player by uid or name", FCVAR_GAMEDLL);
RegisterConCommand("unban", UnbanPlayerCommand, "unbans a given player by uid", FCVAR_NONE);
RegisterConCommand("clearbanlist", ClearBanlistCommand, "clears all uids on the banlist", FCVAR_NONE);
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/clientvideooverrides.cpp b/NorthstarDedicatedTest/clientvideooverrides.cpp
index d5674f51..c5989968 100644
--- a/NorthstarDedicatedTest/clientvideooverrides.cpp
+++ b/NorthstarDedicatedTest/clientvideooverrides.cpp
@@ -35,5 +35,8 @@ void InitialiseClientVideoOverrides(HMODULE baseAddress)
{
HookEnabler hook;
ENABLER_CREATEHOOK(
- hook, GetProcAddress(GetModuleHandleA("bink2w64.dll"), "BinkOpen"), &BinkOpenHook, reinterpret_cast(&BinkOpen));
-}
\ No newline at end of file
+ hook,
+ reinterpret_cast(GetProcAddress(GetModuleHandleA("bink2w64.dll"), "BinkOpen")),
+ &BinkOpenHook,
+ reinterpret_cast(&BinkOpen));
+}
diff --git a/NorthstarDedicatedTest/convar.cpp b/NorthstarDedicatedTest/convar.cpp
index 346e7b69..bf8edbf9 100644
--- a/NorthstarDedicatedTest/convar.cpp
+++ b/NorthstarDedicatedTest/convar.cpp
@@ -1,3 +1,5 @@
+#include
+
#include "pch.h"
#include "bits.h"
#include "cvar.h"
diff --git a/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp b/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
index f1a91e22..01197407 100644
--- a/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
+++ b/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
@@ -1,4 +1,3 @@
-#pragma once
#include "pch.h"
#include "dedicated.h"
#include "dedicatedmaterialsystem.h"
@@ -120,4 +119,4 @@ void InitialiseDedicatedRtechGame(HMODULE baseAddress)
// unfortunately this is unstable, seems to freeze when changing maps
// ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0xB0F0, &PakLoadAPI__LoadRpakHook, reinterpret_cast(&PakLoadAPI__LoadRpak));
// ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0xB170, &PakLoadAPI__LoadRpak2Hook, reinterpret_cast(&PakLoadAPI__LoadRpak2));
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/dllmain.cpp b/NorthstarDedicatedTest/dllmain.cpp
index 41236506..3954991b 100644
--- a/NorthstarDedicatedTest/dllmain.cpp
+++ b/NorthstarDedicatedTest/dllmain.cpp
@@ -52,9 +52,9 @@
#include "rapidjson/writer.h"
#include "rapidjson/error/en.h"
#include "ExploitFixes.h"
-#include "scriptJson.h"
+#include "scriptjson.h"
-typedef void (*initPluginFuncPtr)(void* getPluginObject);
+typedef void (*initPluginFuncPtr)(void* (*getPluginObject)(PluginObject));
bool initialised = false;
@@ -129,7 +129,7 @@ bool LoadPlugins()
spdlog::info("Failed to load library {}: ", std::system_category().message(GetLastError()));
continue;
}
- HRSRC manifestResource = FindResourceW(datafile, MAKEINTRESOURCE(101), MAKEINTRESOURCE(RT_RCDATA));
+ HRSRC manifestResource = FindResourceW(datafile, MAKEINTRESOURCEW(101), MAKEINTRESOURCEW(RT_RCDATA));
if (manifestResource == NULL)
{
@@ -305,4 +305,4 @@ bool InitialiseNorthstar()
CallAllPendingDLLLoadCallbacks();
return true;
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/filesystem.cpp b/NorthstarDedicatedTest/filesystem.cpp
index 702141bb..c17d813f 100644
--- a/NorthstarDedicatedTest/filesystem.cpp
+++ b/NorthstarDedicatedTest/filesystem.cpp
@@ -41,11 +41,19 @@ void InitialiseFilesystem(HMODULE baseAddress)
// create hooks
HookEnabler hook;
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x5CBA0, &ReadFileFromVPKHook, reinterpret_cast(&readFileFromVPK));
- ENABLER_CREATEHOOK(hook, (*g_Filesystem)->m_vtable->ReadFromCache, &ReadFromCacheHook, reinterpret_cast(&readFromCache));
ENABLER_CREATEHOOK(
- hook, (*g_Filesystem)->m_vtable->AddSearchPath, &AddSearchPathHook, reinterpret_cast(&addSearchPathOriginal));
+ hook,
+ reinterpret_cast((*g_Filesystem)->m_vtable->ReadFromCache),
+ &ReadFromCacheHook,
+ reinterpret_cast(&readFromCache));
+ ENABLER_CREATEHOOK(
+ hook,
+ reinterpret_cast((*g_Filesystem)->m_vtable->AddSearchPath),
+ &AddSearchPathHook,
+ reinterpret_cast(&addSearchPathOriginal));
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x15F20, &ReadFileFromFilesystemHook, reinterpret_cast(&readFileFromFilesystem));
- ENABLER_CREATEHOOK(hook, (*g_Filesystem)->m_vtable->MountVPK, &MountVPKHook, reinterpret_cast(&mountVPK));
+ ENABLER_CREATEHOOK(
+ hook, reinterpret_cast((*g_Filesystem)->m_vtable->MountVPK), &MountVPKHook, reinterpret_cast(&mountVPK));
}
std::string ReadVPKFile(const char* path)
@@ -194,4 +202,4 @@ VPKData* MountVPKHook(IFileSystem* fileSystem, const char* vpkPath)
}
return ret;
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/hooks.cpp b/NorthstarDedicatedTest/hooks.cpp
index cc99341a..64099f48 100644
--- a/NorthstarDedicatedTest/hooks.cpp
+++ b/NorthstarDedicatedTest/hooks.cpp
@@ -10,7 +10,6 @@
#include
#include
#include
-#include
typedef LPSTR (*GetCommandLineAType)();
LPSTR GetCommandLineAHook();
@@ -39,11 +38,14 @@ void InstallInitialHooks()
spdlog::error("MH_Initialize (minhook initialization) failed");
HookEnabler hook;
- ENABLER_CREATEHOOK(hook, &GetCommandLineA, &GetCommandLineAHook, reinterpret_cast(&GetCommandLineAOriginal));
- ENABLER_CREATEHOOK(hook, &LoadLibraryExA, &LoadLibraryExAHook, reinterpret_cast(&LoadLibraryExAOriginal));
- ENABLER_CREATEHOOK(hook, &LoadLibraryA, &LoadLibraryAHook, reinterpret_cast(&LoadLibraryAOriginal));
- ENABLER_CREATEHOOK(hook, &LoadLibraryExW, &LoadLibraryExWHook, reinterpret_cast(&LoadLibraryExWOriginal));
- ENABLER_CREATEHOOK(hook, &LoadLibraryW, &LoadLibraryWHook, reinterpret_cast(&LoadLibraryWOriginal));
+ ENABLER_CREATEHOOK(
+ hook, reinterpret_cast(&GetCommandLineA), &GetCommandLineAHook, reinterpret_cast(&GetCommandLineAOriginal));
+ ENABLER_CREATEHOOK(
+ hook, reinterpret_cast(&LoadLibraryExA), &LoadLibraryExAHook, reinterpret_cast(&LoadLibraryExAOriginal));
+ ENABLER_CREATEHOOK(hook, reinterpret_cast(&LoadLibraryA), &LoadLibraryAHook, reinterpret_cast(&LoadLibraryAOriginal));
+ ENABLER_CREATEHOOK(
+ hook, reinterpret_cast(&LoadLibraryExW), &LoadLibraryExWHook, reinterpret_cast(&LoadLibraryExWOriginal));
+ ENABLER_CREATEHOOK(hook, reinterpret_cast(&LoadLibraryW), &LoadLibraryWHook, reinterpret_cast(&LoadLibraryWOriginal));
}
LPSTR GetCommandLineAHook()
@@ -252,4 +254,4 @@ HMODULE LoadLibraryWHook(LPCWSTR lpLibFileName)
}
return moduleAddress;
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/hookutils.h b/NorthstarDedicatedTest/hookutils.h
index 47ec12bf..d0473d69 100644
--- a/NorthstarDedicatedTest/hookutils.h
+++ b/NorthstarDedicatedTest/hookutils.h
@@ -19,4 +19,5 @@ class HookEnabler
};
// macro to call HookEnabler::CreateHook with the hook's name
-#define ENABLER_CREATEHOOK(enabler, ppTarget, ppDetour, ppOriginal) enabler.CreateHook(ppTarget, ppDetour, ppOriginal, #ppDetour)
\ No newline at end of file
+#define ENABLER_CREATEHOOK(enabler, ppTarget, ppDetour, ppOriginal) \
+ enabler.CreateHook(ppTarget, reinterpret_cast(ppDetour), ppOriginal, #ppDetour)
diff --git a/NorthstarDedicatedTest/logging.cpp b/NorthstarDedicatedTest/logging.cpp
index 5936007f..8b752637 100644
--- a/NorthstarDedicatedTest/logging.cpp
+++ b/NorthstarDedicatedTest/logging.cpp
@@ -7,9 +7,8 @@
#include "convar.h"
#include
#include
-#include
-#include
#include "configurables.h"
+#include
// This needs to be called after hooks are loaded so we can access the command line args
void CreateLogFiles()
@@ -484,4 +483,4 @@ void InitialiseClientPrintHooks(HMODULE baseAddress)
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x198710, TextMsgHook, reinterpret_cast(&TextMsg_Original));
Cvar_cl_showtextmsg = new ConVar("cl_showtextmsg", "1", FCVAR_NONE, "Enable/disable text messages printing on the screen.");
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/masterserver.h b/NorthstarDedicatedTest/masterserver.h
index 8dd42d77..e4dcb954 100644
--- a/NorthstarDedicatedTest/masterserver.h
+++ b/NorthstarDedicatedTest/masterserver.h
@@ -1,6 +1,6 @@
#pragma once
#include "convar.h"
-#include
+#include
#include
#include
struct RemoteModInfo
@@ -132,4 +132,4 @@ void InitialiseSharedMasterServer(HMODULE baseAddress);
extern MasterServerManager* g_MasterServerManager;
extern ConVar* Cvar_ns_masterserver_hostname;
-extern ConVar* Cvar_ns_server_password;
\ No newline at end of file
+extern ConVar* Cvar_ns_server_password;
diff --git a/NorthstarDedicatedTest/maxplayers.cpp b/NorthstarDedicatedTest/maxplayers.cpp
index 32f3b2ec..556819f1 100644
--- a/NorthstarDedicatedTest/maxplayers.cpp
+++ b/NorthstarDedicatedTest/maxplayers.cpp
@@ -212,7 +212,7 @@ void RunUserCmds_Hook(bool a1, float a2)
v3 = *(unsigned char*)(g_pGlobals + 73);
if (*(DWORD*)(qword_1814D9648 + 92) &&
- ((*(unsigned __int8(__fastcall**)(__int64))(*(__int64*)g_pEngineServer + 32i64))(g_pEngineServer) ||
+ ((*(unsigned __int8(__fastcall**)(__int64))(*(__int64*)g_pEngineServer + 32))(g_pEngineServer) ||
!*(DWORD*)(qword_1814DA408 + 92)) &&
v3)
{
@@ -282,7 +282,7 @@ void RunUserCmds_Hook(bool a1, float a2)
if (v23)
v19 = 1;
else
- *v21 = 0i64;
+ *v21 = 0;
}
++v20;
++v21;
@@ -679,4 +679,4 @@ void InitialiseMaxPlayersOverride_Client(HMODULE baseAddress)
*(DWORD*)((char*)baseAddress + 0xC3AFF8) = 0;
auto DT_Team_Construct = (__int64(__fastcall*)())((char*)baseAddress + 0x17F950);
DT_Team_Construct();
-}
\ No newline at end of file
+}
diff --git a/NorthstarDedicatedTest/memalloc.cpp b/NorthstarDedicatedTest/memalloc.cpp
index 4ba54c73..e2240269 100644
--- a/NorthstarDedicatedTest/memalloc.cpp
+++ b/NorthstarDedicatedTest/memalloc.cpp
@@ -70,7 +70,7 @@ void* operator new(size_t n)
return _malloc_base(n);
}
-void operator delete(void* p)
+void operator delete(void* p) noexcept
{
_free_base(p);
-} // /FORCE:MULTIPLE
\ No newline at end of file
+} // /FORCE:MULTIPLE
diff --git a/NorthstarDedicatedTest/memalloc.h b/NorthstarDedicatedTest/memalloc.h
index a1b16ad4..fdd6474b 100644
--- a/NorthstarDedicatedTest/memalloc.h
+++ b/NorthstarDedicatedTest/memalloc.h
@@ -11,7 +11,7 @@ extern "C" void _free_base(void* const block);
extern "C" char* _strdup_base(const char* src);
void* operator new(size_t n);
-void operator delete(void* p);
+void operator delete(void* p) noexcept;
// void* malloc(size_t n);
diff --git a/NorthstarDedicatedTest/pch.h b/NorthstarDedicatedTest/pch.h
index 1955071c..75737a44 100644
--- a/NorthstarDedicatedTest/pch.h
+++ b/NorthstarDedicatedTest/pch.h
@@ -13,8 +13,8 @@
// add headers that you want to pre-compile here
#include "memalloc.h"
-#include
-#include
+#include
+#include
#include
#include