bool InjectDLL(PROCESS_INFORMATION * info, const char * dllPath, bool sync) { bool result = false; // wrap DLL injection in SEH, if it crashes print a message __try { result = DoInjectDLL(info, dllPath, sync); } __except(EXCEPTION_EXECUTE_HANDLER) { PrintError("DLL injection failed. In most cases, this is caused by an overly paranoid software firewall or antivirus package. Disabling either of these may solve the problem."); result = false; } return result; }
bool Inject::InjectDLL(DWORD processId, const char * dllPath, bool processWasLaunched) { bool result = false; // wrap DLL injection in SEH, if it crashes print a message __try { result = DoInjectDLL(processId, dllPath, processWasLaunched); } __except(EXCEPTION_EXECUTE_HANDLER) { _injectError = "DLL injection failed. In most cases, this is caused by an overly paranoid software firewall or antivirus package. Disabling either of these may solve the problem."; result = false; } return result; }