Skip to content

Instantly share code, notes, and snippets.

@capntrips
capntrips / Inject.cpp
Last active October 11, 2021 10:46 — forked from robert-nix/Inject.cpp
Unity 2017.1.2p4 type information
// A quick and dirty DLL injector
// This method relies on static linkage and the fact that kernel32 doesn't move
// Compile with the same bitness as the target and the dll.
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <Psapi.h>
#include <stdio.h>
int GetPid(char *modName)
{