Код: Выделить всё
#include
#include
#include
#include
#include
bool InjectDLL(DWORD proccessID,const char* dllPath) {
HANDLE hProcess = nullptr;
HANDLE hThread = nullptr;
LPVOID pRemoteMem = nullptr;
bool success = false;
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE,proccessID);
if (hProcess == nullptr) {
std::cerr
Подробнее здесь: [url]https://stackoverflow.com/questions/79700984/why-does-dll-injection-with-createremotethreadloadlibrary-fail-with-exit-code-0[/url]