102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
main.c File Reference
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <windows.h>

Go to the source code of this file.

Typedefs

typedef int(* launcher_main_fn) (int argc, char **argv)

Functions

static bool get_exe_dir (char *buf, size_t buf_size)
static bool launcher_dll_path (char *out, size_t out_size)
static void show_startup_error (const char *message, DWORD error)
static launcher_main_fn resolve_launcher_main (HMODULE module)
int main (int argc, char *argv[])

Variables

static const char *const LAUNCHER_DLL_RELATIVE_PATH = "modules\\libdttr_launcher.dll"

Typedef Documentation

◆ launcher_main_fn

typedef int(* launcher_main_fn) (int argc, char **argv)

Definition at line 6 of file main.c.

Function Documentation

◆ get_exe_dir()

bool get_exe_dir ( char * buf,
size_t buf_size )
static

Definition at line 10 of file main.c.

References DWORD, and NULL.

◆ launcher_dll_path()

bool launcher_dll_path ( char * out,
size_t out_size )
static

Definition at line 31 of file main.c.

References get_exe_dir(), and LAUNCHER_DLL_RELATIVE_PATH.

Referenced by main().

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 73 of file main.c.

References launcher_dll_path(), NULL, resolve_launcher_main(), and show_startup_error().

◆ resolve_launcher_main()

launcher_main_fn resolve_launcher_main ( HMODULE module)
static

Definition at line 69 of file main.c.

Referenced by main().

◆ show_startup_error()

void show_startup_error ( const char * message,
DWORD error )
static

Definition at line 46 of file main.c.

References DWORD, and NULL.

Variable Documentation

◆ LAUNCHER_DLL_RELATIVE_PATH

const char* const LAUNCHER_DLL_RELATIVE_PATH = "modules\\libdttr_launcher.dll"
static

Definition at line 8 of file main.c.

Referenced by launcher_dll_path().