예제 #1
0
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;
}
예제 #2
0
파일: Inject.cpp 프로젝트: jmquigs/ModelMod
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;
}