Added winmm.dll for self-injection

This commit is contained in:
acidicoala
2025-09-22 03:57:11 +05:00
parent c75bbcf636
commit 7ab9895b58
5 changed files with 19 additions and 10 deletions

View File

@@ -117,6 +117,13 @@ if(WIN32)
INPUT_SOURCES_DIR ""
DLL_FILES_GLOB "C:/Windows/System32/version.dll"
)
configure_linker_exports(
TARGET SmokeAPI
HEADER_NAME "linker_exports_for_winmm.h"
FORWARDED_DLL "C:/Windows/System32/winmm.dll"
INPUT_SOURCES_DIR ""
DLL_FILES_GLOB "C:/Windows/System32/winmm.dll"
)
else()
# configure_linker_exports(
# TARGET SmokeAPI

View File

@@ -83,20 +83,20 @@ If that didn't work, refer to the _Troubleshooting_ section below.
- Download the [latest SmokeAPI release zip].
- From this downloaded zip extract `smoke_api32.dll` or `smoke_api64.dll`, depending on a game's bitness.
- Rename the unzipped DLL to `version.dll`.
- Place this `version.dll` next to the game's `.exe` file.
- Rename the unzipped DLL to `version.dll` or `winmm.dll`.
- Place this `version.dll` or `winmm.dll` next to the game's `.exe` file.
#### 🪝 Hook mode with Koaloader
If a game doesn't load
`version.dll`, you can use an alternative injector to load SmokeAPI into the game process.
If a game doesn't load `version.dll` or `winmm.dll`, you can use an alternative injector to load
SmokeAPI into the game process.
One such injector is [Koaloader], which supports different DLLs that a typical game might load.
For example, assuming that the game loads `winmm.dll`:
For example, assuming that the game loads `d3d11.dll`:
- Install Koaloader:
- Download the [latest Koaloader release zip].
- From this downloaded zip extract `winmm.dll` from `winmm-32` or `winmm-64`, depending on a game's bitness.
- Place `winmm.dll` next to the game's `.exe` file.
- From this downloaded zip extract `d3d11.dll` from `d3d11-32` or `d3d11-64`, depending on a game's bitness.
- Place `d3d11.dll` next to the game's `.exe` file.
- Install SmokeAPI
- Download the [latest SmokeAPI release zip].
- From this downloaded zip extract `smoke_api32.dll` or `smoke_api64.dll`, depending on a game's bitness.

View File

@@ -2,9 +2,10 @@
#include "smoke_api/smoke_api.hpp"
// This header will be populated at build time
// These headers will be populated at build time
#include "linker_exports_for_steam_api.h"
#include "linker_exports_for_version.h"
#include "linker_exports_for_winmm.h"
DLL_MAIN(void* handle, const uint32_t reason, void*) {
if(reason == DLL_PROCESS_ATTACH) {

View File

@@ -14,7 +14,8 @@
"forum_topic_url": "https://cs.rin.ru/forum/viewtopic.php?p=2597932#p2597932",
"dlc_database": "SteamDB",
"dlc_database_url": "https://steamdb.info/",
"json_schema_path": "./res/SmokeAPI.schema.json"
"json_schema_path": "./res/SmokeAPI.schema.json",
"self_inject_dll": "`version.dll` or `winmm.dll`"
},
"tasks": [
{