Add detour lib
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#include "Header.h"
|
||||
|
||||
bool analyze_process_handle(HANDLE hProcess) {
|
||||
|
||||
}
|
||||
+17
-8
@@ -1,13 +1,19 @@
|
||||
// GameAnalyzer.cpp : Ce fichier contient la fonction 'main'. L'exécution du programme commence et se termine à cet endroit.
|
||||
//
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
|
||||
#include "Header.h"
|
||||
|
||||
// If compiling as 64-bit
|
||||
#ifdef _M_X64
|
||||
#pragma comment (lib, "detoursx64.lib")
|
||||
#endif // _M_X64
|
||||
|
||||
|
||||
// If compiling as 32-bit
|
||||
#ifdef _M_IX86
|
||||
#pragma comment (lib, "detoursx86.lib")
|
||||
#endif // _M_IX86
|
||||
|
||||
|
||||
const bool affiche_process_handle = 1;
|
||||
const bool affiche_pid = 1;
|
||||
@@ -31,6 +37,8 @@ bool ContainsIgnoreCase(const std::string& text, const std::string& search)
|
||||
return ToLower(text).find(ToLower(search)) != std::string::npos;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (argc > 2) {
|
||||
@@ -69,6 +77,7 @@ int main(int argc, char** argv)
|
||||
if (affiche_process_handle || affiche_pid)
|
||||
output << "--->";
|
||||
output << imageFileName << std::endl;
|
||||
bool ret_analyze_process_handle = analyze_process_handle(hProcess);
|
||||
}
|
||||
CloseHandle(hProcess);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
@@ -139,8 +139,12 @@
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AnalyzeProcessHandle.cpp" />
|
||||
<ClCompile Include="GameAnalyzer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Header.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
|
||||
#include <detours.h>
|
||||
// If compiling as 64-bit
|
||||
#ifdef _M_X64
|
||||
#pragma comment (lib, "detoursx64.lib")
|
||||
#endif // _M_X64
|
||||
|
||||
// If compiling as 32-bit
|
||||
#ifdef _M_IX86
|
||||
#pragma comment (lib, "detoursx86.lib")
|
||||
#endif // _M_IX86
|
||||
|
||||
bool analyze_process_handle(HANDLE hProcess);
|
||||
Reference in New Issue
Block a user