Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 2 additions & 27 deletions lib/CoHModSDK/include/CoHModSDK.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,19 @@ extern "C" {

namespace ModSDK {
namespace Memory {
/**
* @brief Returns a handle to the module that contains the original game code.
*
* @return HMODULE - Handle to `WW2Mod.original.dll` with fallback to `WW2Mod.dll`.
*/
HMODULE GetGameModuleHandle();

/**
* @brief Scans a module for a byte pattern signature.
*
* Use `GetGameModuleHandle()` when you want to scan the original game module.
*
* @param moduleHandle Handle to the module to scan.
* @param moduleName Name of the module (e.g., "WW2Mod.dll").
* @param signature Pattern string (e.g., "48 8B ?? ?? ?? ?? ?? 48 8B").
* @param reportError Whether to show an error if the pattern is not found.
* @return std::uintptr_t Address where the pattern was found or 0 if not found.
*/
std::uintptr_t FindPattern(HMODULE moduleHandle, const char* signature, bool reportError = true);
std::uintptr_t FindPattern(const char* moduleName, const char* signature, bool reportError = true);

/**
* @brief Patches memory by copying bytes to a destination address.
*
* Automatically changes memory protection to allow writing.
*
* @param destination Target address to patch.
* @param source Bytes to write.
* @param size Number of bytes to copy.
Expand All @@ -115,26 +104,12 @@ namespace ModSDK {
*/
bool EnableHook(void* targetFunction);

/**
* @brief Enables all hooks created by the SDK.
*
* @return true if successful, false otherwise.
*/
bool EnableAllHooks();

/**
* @brief Disables an individual hook.
*
* @param targetFunction Pointer to the hooked function.
* @return true if successfully disabled, false otherwise.
*/
bool DisableHook(void* targetFunction);

/**
* @brief Disables all active hooks created by the SDK.
*
* @return true if successful, false otherwise.
*/
bool DisableAllHooks();
}
}
Binary file modified lib/CoHModSDK/lib/x86/CoHModSDK.lib
Binary file not shown.
8 changes: 4 additions & 4 deletions res/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,1,1,0
PRODUCTVERSION 0,1,1,0
FILEVERSION 0,1,2,0
PRODUCTVERSION 0,1,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Tosox"
VALUE "FileDescription", "A wrapper mod for the FactionFix.dll"
VALUE "FileVersion", "0.1.1.0"
VALUE "FileVersion", "0.1.2.0"
VALUE "InternalName", "FactionFixLoader"
VALUE "LegalCopyright", "Copyright © 2026"
VALUE "OriginalFilename", "FactionFixLoader.dll"
VALUE "ProductName", "FactionFixLoader"
VALUE "ProductVersion", "0.1.1.0"
VALUE "ProductVersion", "0.1.2.0"
END
END
BLOCK "VarFileInfo"
Expand Down
2 changes: 1 addition & 1 deletion src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {
}

__declspec(dllexport) const char* GetModVersion() {
return "1.1.0";
return "1.2.0";
}

__declspec(dllexport) const char* GetModAuthor() {
Expand Down
Loading