diff --git a/ASILoader/ASILoader.vcxproj b/ASILoader/ASILoader.vcxproj
index b1af04f..f0fbb22 100644
--- a/ASILoader/ASILoader.vcxproj
+++ b/ASILoader/ASILoader.vcxproj
@@ -170,10 +170,6 @@
false
-
-
-
-
diff --git a/ASILoader/framework.h b/ASILoader/framework.h
deleted file mode 100644
index 9684e58..0000000
--- a/ASILoader/framework.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-
-#define WIN32_LEAN_AND_MEAN // Exclure les en-têtes Windows rarement utilisés
-// Fichiers d'en-tête Windows
-#include
diff --git a/ASILoader/pch.h b/ASILoader/pch.h
deleted file mode 100644
index 32ba33d..0000000
--- a/ASILoader/pch.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// pch.h : Il s'agit d'un fichier d'en-tête précompilé.
-// Les fichiers listés ci-dessous sont compilés une seule fois, ce qui améliore les performances de génération des futures builds.
-// Cela affecte également les performances d'IntelliSense, notamment la complétion du code et de nombreuses fonctionnalités de navigation du code.
-// Toutefois, les fichiers listés ici sont TOUS recompilés si l'un d'entre eux est mis à jour entre les builds.
-// N'ajoutez pas de fichiers fréquemment mis à jour ici, car cela annule les gains de performance.
-
-#ifndef PCH_H
-#define PCH_H
-
-// ajouter les en-têtes à précompiler ici
-#include "framework.h"
-
-#endif //PCH_H
diff --git a/ASILoader/version.cpp b/ASILoader/version.cpp
index 21d1dc1..258f3d2 100644
--- a/ASILoader/version.cpp
+++ b/ASILoader/version.cpp
@@ -92,22 +92,6 @@ extern "C" DWORD WINAPI VerFindFileW(DWORD uFlags, LPCWSTR szFileName, LPCWSTR s
return real(uFlags, szFileName, szWinDir, szAppDir, szCurDir, pcchCurDir, szDestDir, pcchDestDir);
}
-//extern "C" DWORD WINAPI VerInstallFileA(DWORD uFlags, LPCSTR szSrcFileName, LPCSTR szDestFileName, LPCSTR szSrcDir, LPCSTR szDestDir, LPCSTR szCurDir, LPSTR szTmpFile, UINT cchTmpFile, UINT* puVersion)
-//{
-// LoadRealVersionDLL();
-// using Fn = DWORD(WINAPI*)(DWORD, LPCSTR, LPCSTR, LPCSTR, LPCSTR, LPCSTR, LPSTR, UINT, UINT*);
-// static Fn real = (Fn)GetProcAddress(real_version, "VerInstallFileA");
-// return real(uFlags, szSrcFileName, szDestFileName, szSrcDir, szDestDir, szCurDir, szTmpFile, cchTmpFile, puVersion);
-//}
-//
-//extern "C" DWORD WINAPI VerInstallFileW(DWORD uFlags, LPCWSTR szSrcFileName, LPCWSTR szDestFileName, LPCWSTR szSrcDir, LPCWSTR szDestDir, LPCWSTR szCurDir, LPWSTR szTmpFile, UINT cchTmpFile, UINT* puVersion)
-//{
-// LoadRealVersionDLL();
-// using Fn = DWORD(WINAPI*)(DWORD, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, UINT, UINT*);
-// static Fn real = (Fn)GetProcAddress(real_version, "VerInstallFileW");
-// return real(uFlags, szSrcFileName, szDestFileName, szSrcDir, szDestDir, szCurDir, szTmpFile, cchTmpFile, puVersion);
-//}
-
extern "C" DWORD WINAPI VerLanguageNameA(DWORD wLang, LPSTR szLang, DWORD cchLang)
{
LoadRealVersionDLL();
@@ -161,92 +145,3 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
}
return TRUE;
}
-
-
-//// dllmain.cpp : Définit le point d'entrée de l'application DLL.
-//#include
-//#include
-//
-//HMODULE real_version = nullptr;
-//
-//using namespace std;
-//
-//// Typedefs des fonctions qu'on va forwarder
-//typedef BOOL(WINAPI* GetFileVersionInfoAFn)(LPCSTR, DWORD, DWORD, LPVOID);
-//typedef BOOL(WINAPI* GetFileVersionInfoWFn)(LPCWSTR, DWORD, DWORD, LPVOID);
-//
-//GetFileVersionInfoAFn real_GetFileVersionInfoA = nullptr;
-//GetFileVersionInfoWFn real_GetFileVersionInfoW = nullptr;
-//
-//// Charge tous les plugins .asi du dossier du jeu
-//void LoadAllASI()
-//{
-// auto path = std::filesystem::current_path();
-// for (const auto& entry : std::filesystem::directory_iterator(path))
-// {
-// if (entry.path().extension() == ".asi")
-// {
-// LoadLibraryW(entry.path().c_str());
-// }
-// }
-//}
-//
-//// Fonctions exportées, simplement redirigées vers la vraie version.dll
-////extern "C" __declspec(dllexport) BOOL WINAPI GetFileVersionInfoA(LPCSTR lptstrFilename, DWORD dwHandle, DWORD dwLen, LPVOID lpData)
-//BOOL WINAPI GetFileVersionInfoA(LPCSTR lptstrFilename, DWORD dwHandle, DWORD dwLen, LPVOID lpData)
-//{
-// if (!real_version) real_version = LoadLibraryW(L"C:\\Windows\\System32\\version.dll");
-// if (!real_GetFileVersionInfoA) real_GetFileVersionInfoA = (GetFileVersionInfoAFn)GetProcAddress(real_version, "GetFileVersionInfoA");
-// return real_GetFileVersionInfoA(lptstrFilename, dwHandle, dwLen, lpData);
-//}
-//
-//BOOL WINAPI GetFileVersionInfoW(LPCWSTR lptstrFilename, DWORD dwHandle, DWORD dwLen, LPVOID lpData)
-//{
-// if (!real_version) real_version = LoadLibraryW(L"C:\\Windows\\System32\\version.dll");
-// if (!real_GetFileVersionInfoW) real_GetFileVersionInfoW = (GetFileVersionInfoWFn)GetProcAddress(real_version, "GetFileVersionInfoW");
-// return real_GetFileVersionInfoW(lptstrFilename, dwHandle, dwLen, lpData);
-//}
-//
-//DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR lptstrFilename, LPDWORD lpdwHandle)
-//{
-// if (!real_version) real_version = LoadLibraryW(L"C:\\Windows\\System32\\version.dll");
-// using Fn = DWORD(WINAPI*)(LPCSTR, LPDWORD);
-// static Fn real = (Fn)GetProcAddress(real_version, "GetFileVersionInfoSizeA");
-// return real(lptstrFilename, lpdwHandle);
-//}
-//
-//DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR lptstrFilename, LPDWORD lpdwHandle)
-//{
-// if (!real_version) real_version = LoadLibraryW(L"C:\\Windows\\System32\\version.dll");
-// using Fn = DWORD(WINAPI*)(LPCWSTR, LPDWORD);
-// static Fn real = (Fn)GetProcAddress(real_version, "GetFileVersionInfoSizeW");
-// return real(lptstrFilename, lpdwHandle);
-//}
-//
-//BOOL WINAPI VerQueryValueA(LPCVOID pBlock, LPCSTR lpSubBlock, LPVOID* lplpBuffer, PUINT puLen)
-//{
-// if (!real_version) real_version = LoadLibraryW(L"C:\\Windows\\System32\\version.dll");
-// using Fn = BOOL(WINAPI*)(LPCVOID, LPCSTR, LPVOID*, PUINT);
-// static Fn real = (Fn)GetProcAddress(real_version, "VerQueryValueA");
-// return real(pBlock, lpSubBlock, lplpBuffer, puLen);
-//}
-//
-//BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID* lplpBuffer, PUINT puLen)
-//{
-// if (!real_version) real_version = LoadLibraryW(L"C:\\Windows\\System32\\version.dll");
-// using Fn = BOOL(WINAPI*)(LPCVOID, LPCWSTR, LPVOID*, PUINT);
-// static Fn real = (Fn)GetProcAddress(real_version, "VerQueryValueW");
-// return real(pBlock, lpSubBlock, lplpBuffer, puLen);
-//}
-//
-//// Point d'entrée principal
-//BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
-//{
-// if (ul_reason_for_call == DLL_PROCESS_ATTACH)
-// {
-// LoadAllASI();
-// }
-// return TRUE;
-//}
-//
-//
diff --git a/Days Gone/dllmain.cpp b/Days Gone/dllmain.cpp
index 7fd936b..70b099a 100644
--- a/Days Gone/dllmain.cpp
+++ b/Days Gone/dllmain.cpp
@@ -1,11 +1,9 @@
#include "Memory.hpp";
#include "Maths.hpp";
#include "ObfuscateString.h"
-#include
#include
#include
#include
-#include
#include
// Constants
@@ -172,6 +170,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress != nullptr && FOVfactorAddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -243,7 +242,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/Dead Space 2023/dllmain.cpp b/Dead Space 2023/dllmain.cpp
index 113618f..acf9518 100644
--- a/Dead Space 2023/dllmain.cpp
+++ b/Dead Space 2023/dllmain.cpp
@@ -89,6 +89,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection function
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -129,7 +130,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/Empire Of The Ants/Empire Of The Ants.vcxproj b/Empire Of The Ants/Empire Of The Ants.vcxproj
index 0909de3..df8af93 100644
--- a/Empire Of The Ants/Empire Of The Ants.vcxproj
+++ b/Empire Of The Ants/Empire Of The Ants.vcxproj
@@ -193,7 +193,6 @@
-
diff --git a/Empire Of The Ants/dllmain.cpp b/Empire Of The Ants/dllmain.cpp
index 5f381fb..004fc6d 100644
--- a/Empire Of The Ants/dllmain.cpp
+++ b/Empire Of The Ants/dllmain.cpp
@@ -1,11 +1,9 @@
#include "Memory.hpp";
#include "Maths.hpp";
#include "ObfuscateString.h"
-#include
#include
#include
#include
-#include
#include
// Constants
@@ -141,6 +139,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -213,7 +212,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/Indiana Jones And The Great Circle/Indiana Jones And The Great Circle.vcxproj b/Indiana Jones And The Great Circle/Indiana Jones And The Great Circle.vcxproj
index c62c46a..c69faa9 100644
--- a/Indiana Jones And The Great Circle/Indiana Jones And The Great Circle.vcxproj
+++ b/Indiana Jones And The Great Circle/Indiana Jones And The Great Circle.vcxproj
@@ -193,7 +193,6 @@
-
diff --git a/Indiana Jones And The Great Circle/dllmain.cpp b/Indiana Jones And The Great Circle/dllmain.cpp
index fe731bc..5e5419f 100644
--- a/Indiana Jones And The Great Circle/dllmain.cpp
+++ b/Indiana Jones And The Great Circle/dllmain.cpp
@@ -175,6 +175,7 @@ static void FOVFixEnabled(bool fix_enabled) {
}
}
+// Injection functions
static void CinematicsFOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && CinematicsFOVaddress != nullptr) {
if (!CinematicsFOVHook) {
@@ -227,7 +228,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/Maths/Maths.vcxproj b/Maths/Maths.vcxproj
index b3ab589..1293f92 100644
--- a/Maths/Maths.vcxproj
+++ b/Maths/Maths.vcxproj
@@ -147,7 +147,6 @@
-
diff --git a/Maths/framework.h b/Maths/framework.h
deleted file mode 100644
index afd886f..0000000
--- a/Maths/framework.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#define WIN32_LEAN_AND_MEAN // Exclure les en-têtes Windows rarement utilisés
diff --git a/Memory/Memory.vcxproj b/Memory/Memory.vcxproj
index 9a85b10..b88a629 100644
--- a/Memory/Memory.vcxproj
+++ b/Memory/Memory.vcxproj
@@ -152,7 +152,6 @@
-
diff --git a/Memory/framework.h b/Memory/framework.h
deleted file mode 100644
index afd886f..0000000
--- a/Memory/framework.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#define WIN32_LEAN_AND_MEAN // Exclure les en-têtes Windows rarement utilisés
diff --git a/Metro Exodus/Metro Exodus.vcxproj b/Metro Exodus/Metro Exodus.vcxproj
index 289b34f..0de2058 100644
--- a/Metro Exodus/Metro Exodus.vcxproj
+++ b/Metro Exodus/Metro Exodus.vcxproj
@@ -193,7 +193,6 @@
-
diff --git a/Metro Exodus/dllmain.cpp b/Metro Exodus/dllmain.cpp
index f771ad4..325f633 100644
--- a/Metro Exodus/dllmain.cpp
+++ b/Metro Exodus/dllmain.cpp
@@ -156,6 +156,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -250,7 +251,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/Mindseye/Mindseye.vcxproj b/Mindseye/Mindseye.vcxproj
index a51041e..974bfc8 100644
--- a/Mindseye/Mindseye.vcxproj
+++ b/Mindseye/Mindseye.vcxproj
@@ -193,7 +193,6 @@
-
diff --git a/Mindseye/dllmain.cpp b/Mindseye/dllmain.cpp
index 22caa89..81aa60c 100644
--- a/Mindseye/dllmain.cpp
+++ b/Mindseye/dllmain.cpp
@@ -134,6 +134,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -206,7 +207,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/Robocop UB/dllmain.cpp b/Robocop UB/dllmain.cpp
index 820abbb..4baad22 100644
--- a/Robocop UB/dllmain.cpp
+++ b/Robocop UB/dllmain.cpp
@@ -211,7 +211,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/South Of Midnight/South Of Midnight.vcxproj b/South Of Midnight/South Of Midnight.vcxproj
index 5d625ae..813e4cb 100644
--- a/South Of Midnight/South Of Midnight.vcxproj
+++ b/South Of Midnight/South Of Midnight.vcxproj
@@ -193,7 +193,6 @@
-
diff --git a/South Of Midnight/dllmain.cpp b/South Of Midnight/dllmain.cpp
index 612c05e..78c64df 100644
--- a/South Of Midnight/dllmain.cpp
+++ b/South Of Midnight/dllmain.cpp
@@ -132,6 +132,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -194,7 +195,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/SpiritOfTheNorth/SpiritOfTheNorth.vcxproj b/SpiritOfTheNorth/SpiritOfTheNorth.vcxproj
index 0688991..19f9b54 100644
--- a/SpiritOfTheNorth/SpiritOfTheNorth.vcxproj
+++ b/SpiritOfTheNorth/SpiritOfTheNorth.vcxproj
@@ -193,7 +193,6 @@
-
diff --git a/SpiritOfTheNorth/dllmain.cpp b/SpiritOfTheNorth/dllmain.cpp
index e87db5e..f169935 100644
--- a/SpiritOfTheNorth/dllmain.cpp
+++ b/SpiritOfTheNorth/dllmain.cpp
@@ -134,6 +134,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -206,7 +207,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/TLOU2/dllmain.cpp b/TLOU2/dllmain.cpp
index a57e1e7..209582f 100644
--- a/TLOU2/dllmain.cpp
+++ b/TLOU2/dllmain.cpp
@@ -91,7 +91,6 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
logger->warn("Some AOB signatures could not be found. Fixes may be partially unavailable.");
}
}
- // === Activer ou désactiver les patchs ===
if (FOVAddress && CameraAddress && SharpnessAddress)
{
if (g_fix_enabled)
@@ -153,6 +152,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVAddress != nullptr) {
if (!FOVHook) { // Hook only once
@@ -227,7 +227,7 @@ static void InitializeLogger()
}
HMODULE g_coreModule = nullptr;
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/Uncharted LOTC/dllmain.cpp b/Uncharted LOTC/dllmain.cpp
index dd2c7ae..a064a4f 100644
--- a/Uncharted LOTC/dllmain.cpp
+++ b/Uncharted LOTC/dllmain.cpp
@@ -63,8 +63,6 @@ static void BDFixEnabled(bool fix_enabled);
// Original byte
static std::vector originalBytes = std::vector();
-HANDLE g_mutex = NULL;
-
static std::string GetExecutableFileNameOnly() {
char path[MAX_PATH];
GetModuleFileNameA(nullptr, path, MAX_PATH);
@@ -249,6 +247,7 @@ extern "C" __declspec(dllexport) float GetFOVOut() {
return g_FOV_Out;
}
+// Injection functions
static void FOVFixEnabled(bool fix_enabled) {
if (g_fix_enabled && fix_enabled && FOVaddress) {
if (!FOVHook) { // Hook only once
@@ -267,7 +266,6 @@ static void FOVFixEnabled(bool fix_enabled) {
}
}
-// Injection functions
static void PhotoFOVFixEnabled (bool fix_enabled) {
if (g_fix_enabled && fix_enabled && PHOTOaddress) {
if (!PhotoFOVHook) { // Hook only once
@@ -377,7 +375,7 @@ static void InitializeLogger()
}
}
-// Entrée standard DLL
+// Standard dll entry
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
diff --git a/external/Hooking/InjectHook.cpp b/external/Hooking/InjectHook.cpp
new file mode 100644
index 0000000..79c80e4
--- /dev/null
+++ b/external/Hooking/InjectHook.cpp
@@ -0,0 +1,58 @@
+#include "InjectHook.h"
+#include
+#include