>>102638419
Loading stuff from a DLL is fairly trivial to implement on each platform. For Windows:
#include <windows.h>
#include <pathcch.h>
char exe[MAX_PATH];
GetModuleFileNameA(NULL, exe, sizeof(exe));
PathCchRemoveFileSpec(exe, sizeof(exe));
PathCchCombine(exe, sizeof(exe), exe, "Hitler.dll");
HMODULE dll = LoadLibraryA(exe);
PFNCommitSuicide* commit_suicide = GetProcAddress(dll, "CommitSuicide");
For Linux:
#include <dlfcn.h>
#include <unistd.h>
char exe[1024] = "";
readlink("/proc/self/exe", exe, sizeof(exe)-1);
strcpy(strrchr(exe, '/')+1, "libHitler.so"); // this code comes with NO WARRANTY
void* dll = dlopen(exe);
PFNCommitSuicide* commit_suicide = dlsym(dll, "CommitSuicide");
For fagOS:
#include <dlfcn.h>
#include <unistd.h>
#include <mach-o/dyld.h>
char exe[1024] = "", fuckoff[1024] = "";
uint32_t size = sizeof(fuckoff);
_NSGetExecutablePath(fuckoff, &size);
readlink(fuckoff, exe, sizeof(exe)-1);
strcpy(strrchr(exe, '/')+1, "libHitler.dylib");
void* dll = dlopen(exe);
PFNCommitSuicide* commit_suicide = dlsym(dll, "CommitSuicide");
Or at least that's the basic idea. I'm sure you can figure out the quirks. Point is, there's no reason to limit yourself to Windows.