Spellforce-Spell-framework
Loading...
Searching...
No Matches
sfsf.cpp File Reference
#include <windows.h>
#include "core/sf_hooks.h"
#include "core/sf_wrappers.h"
#include "registry/sf_registry.h"
#include "../asi/sf_asi.h"
#include <stdio.h>
Include dependency graph for sfsf.cpp:

Go to the source code of this file.

Functions

DebugLevel parse_debug_level (const char *levelStr)
void create_default_ini_file (const char *filename)
void load_debug_level_from_ini (const char *filename)
BOOL APIENTRY DllMain (HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
 Entry point for the DLL.

Variables

DebugLevel global_debug_level = DEBUG_INFO

Function Documentation

◆ create_default_ini_file()

void create_default_ini_file ( const char * filename)

Definition at line 34 of file sfsf.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DllMain()

BOOL APIENTRY DllMain ( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )

Entry point for the DLL.

This function is called by the operating system when the DLL is loaded or unloaded. It handles initialization and cleanup based on the reason for the call.

Parameters
hModuleHandle to the DLL module. This value is used for resource management.
ul_reason_for_callThe reason the function is being called. Possible values include:
  • DLL_PROCESS_ATTACH: The DLL is being loaded into the process's address space.
  • DLL_THREAD_ATTACH: A new thread is being created in the process (not handled here).
  • DLL_THREAD_DETACH: A thread is exiting cleanly (not handled here).
  • DLL_PROCESS_DETACH: The DLL is being unloaded from the process's address space.
lpReservedIf ul_reason_for_call is DLL_PROCESS_ATTACH, this parameter is NULL for dynamic loads and non-NULL for static loads. If ul_reason_for_call is DLL_PROCESS_DETACH, this parameter is NULL if the DLL is being unloaded by a call to FreeLibrary, or non-NULL if the process is terminating.
Returns
Returns TRUE if successful; FALSE otherwise. If FALSE is returned during DLL_PROCESS_ATTACH, the DLL will not be loaded.
See also
ASI::Init(), ASI::CheckSFVersion(), initialize_framework(), initialize_beta_hooks()

Definition at line 118 of file sfsf.cpp.

Here is the call graph for this function:

◆ load_debug_level_from_ini()

void load_debug_level_from_ini ( const char * filename)

Definition at line 53 of file sfsf.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_debug_level()

DebugLevel parse_debug_level ( const char * levelStr)

Definition at line 19 of file sfsf.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ global_debug_level

DebugLevel global_debug_level = DEBUG_INFO

Definition at line 18 of file sfsf.cpp.