Skip to content

Commit 39ca2d1

Browse files
committed
Final: all exports + lazy _init_fn from SteamAPI_Init (no DllMain LoadLibrary)
1 parent 9097e9a commit 39ca2d1

6 files changed

Lines changed: 25009 additions & 1 deletion

File tree

dllmain.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma comment(lib, "Shlwapi.lib")
77

8+
extern "C" void _init_fn(void);
9+
810
// Type definitions (not provided by SDK headers in this project)
911
typedef unsigned int uint32;
1012
typedef unsigned long long uint64;
@@ -158,6 +160,7 @@ extern "C"
158160

159161
__declspec(dllexport) bool SteamAPI_Init()
160162
{
163+
_init_fn(); // Lazy-load trampoline function pointers (NOT in DllMain)
161164
SetAppIDEnv();
162165
auto pfn = GetRealProc<decltype(&SteamAPI_Init)>("SteamAPI_Init");
163166
return pfn ? pfn() : false;

0 commit comments

Comments
 (0)