Spellforce-Spell-framework
Loading...
Searching...
No Matches
sfsf.cpp
Go to the documentation of this file.
1
11#include <windows.h>
12#include "core/sf_hooks.h"
13#include "core/sf_wrappers.h"
15#include "../asi/sf_asi.h"
16#include <stdio.h>
17
38BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,
39 LPVOID lpReserved)
40{
41 switch (ul_reason_for_call)
42 {
43 case DLL_PROCESS_ATTACH:
44 {
45 if (!ASI::Init(hModule))
46 return FALSE;
48 {
49 return FALSE;
50 }
51 else
52 {
53 FILE *file = fopen("sfsf.log", "w");
54 fclose(file);
55
56 log_info("Spellforce Version Accepted; Starting SFSF");
59 OutputDebugStringA("[SFSF] |======================| Injection Complete |======================|");
60 break;
61 }
62 break;
63 }
64 case DLL_PROCESS_DETACH:
65 break;
66 }
67 return TRUE;
68}
void initialize_beta_hooks()
Definition sf_hooks.c:502
void log_info(const char *message)
Definition sf_wrappers.c:89
@ SF_BETA
Definition sf_asi.h:12
bool __stdcall CheckSFVersion(SF_Version sf_version)
check version of the game that was hooked into
Definition sf_asi.cpp:54
bool Init(HMODULE lib_module)
required for everything to work... why?
Definition sf_asi.cpp:35
void initialize_framework()
Initializes the Spellforce Spell Framework (SFSF).
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
Entry point for the DLL.
Definition sfsf.cpp:38