Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Detours.h Compile Errors

Detours.h Compile Errors

Posts 1–9 of 9 · Page 1 of 1
BE
beeker
Detours.h Compile Errors
Hey guys, just reinstalled Crysis and am getting back into coding hacks for it, but I've ran across a few problems. I'm using Visual Studio 2005 and Detours 1.5. Here is the program I'm trying to include it on, it's just a simple dll injector:

Code:
//------------------------------------------------------------------------------------------
//	This Injector launch an application with dxhook injected to it.
//------------------------------------------------------------------------------------------
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <atlbase.h>
#include <atlstr.h>
#include <conio.h>
#include <iostream>
#include <fstream>
#include <string>
#include "stdafx.h"

#include <detours.h>
	
#define GAME2

int main()
{
	////////////////////////////////////
	// Launch The Process
	////////////////////////////////////
	STARTUPINFO si = {sizeof(STARTUPINFO)};
	PROCESS_INFORMATION pi = {0};

	//	Run the application with our dll
#ifdef GAME1
	BOOL bResult = DetourCreateProcessWithDll(L"D:\\Games\\World of Warcraft\\wow.exe", NULL, 0, 0, TRUE,
		CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE, NULL,
		L"D:\\Games\\World of Warcraft",&si, &pi, L"D:\\Technion\\Semester 6\\Graphics Project\\Wrapper\\DXWrapper\\Release\\dxhook.dll" , 0 );
#endif
#ifdef GAME2
	BOOL bResult = DetourCreateProcessWithDll(L"C:\\Program Files\\Electronic Arts\\Crytek\\Crysis\\Bin32\\Crysis.exe", NULL, 0, 0, TRUE,
		CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE, NULL,
		L"C:\\Program Files\\Electronic Arts\\Crytek\\Crysis\\Bin32",&si, &pi, L"C:\\Program Files\\Electronic Arts\\Crytek\\Crysis\\Mods\\CrysisMod\\Bin32\\CrysisH.dll" , 0 );
#endif

#ifdef GAME3
	BOOL bResult = DetourCreateProcessWithDll(L"D:\\Games\\Tomb Raider - Anniversary\\tra.exe", NULL, 0, 0, TRUE,
		CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE, NULL,
		L"D:\\Games\\Tomb Raider - Anniversary",&si, &pi, L"D:\\Technion\\Semester 6\\Graphics Project\\Wrapper\\DXWrapper\\Release\\dxhook.dll" , 0 );
#endif

#ifdef GAME4
	BOOL bResult = DetourCreateProcessWithDll(L"D:\\Games\\Heroes of Might and Magic V - Tribes of the East\\bin\\H5_Game.exe", NULL, 0, 0, TRUE,
		CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE, NULL,
		L"D:\\Games\\Heroes of Might and Magic V - Tribes of the East\\bin",&si, &pi, L"D:\\Technion\\Semester 6\\Graphics Project\\Wrapper\\DXWrapper\\Release\\dxhook.dll" , 0 );
#endif


	printf("Attached is %s.\n", (bResult)?"successful":"unsuccessful");
	if (!bResult)
		getch();
}
And here are the errors I'm getting when I try to compile:

Code:
1>------ Build started: Project: NewDllLauncher, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(23) : error C2146: syntax error : missing ';' before identifier 'Data1'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(23) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(23) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(24) : error C2146: syntax error : missing ';' before identifier 'Data2'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(25) : error C2146: syntax error : missing ';' before identifier 'Data3'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(26) : error C2146: syntax error : missing ';' before identifier 'Data4'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(26) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(26) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(139) : error C2146: syntax error : missing ';' before identifier 'cbHeaderSize'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(139) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(139) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(140) : error C2146: syntax error : missing ';' before identifier 'nSignature'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(140) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(140) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(141) : error C2146: syntax error : missing ';' before identifier 'nDataOffset'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(142) : error C2146: syntax error : missing ';' before identifier 'cbDataSize'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(142) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(142) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(144) : error C2146: syntax error : missing ';' before identifier 'nOriginalImportVirtualAddress'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(144) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(144) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(145) : error C2146: syntax error : missing ';' before identifier 'nOriginalImportSize'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(145) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(145) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(146) : error C2146: syntax error : missing ';' before identifier 'nOriginalBoundImportVirtualAddress'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(146) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(146) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(147) : error C2146: syntax error : missing ';' before identifier 'nOriginalBoundImportSize'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(147) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(147) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(149) : error C2146: syntax error : missing ';' before identifier 'nOriginalIatVirtualAddress'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(149) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(149) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(150) : error C2146: syntax error : missing ';' before identifier 'nOriginalIatSize'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(151) : error C2146: syntax error : missing ';' before identifier 'nOriginalSizeOfImage'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(152) : error C2146: syntax error : missing ';' before identifier 'nReserve'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(157) : error C2146: syntax error : missing ';' before identifier 'cbBytes'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(158) : error C2146: syntax error : missing ';' before identifier 'nReserved'
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(183) : error C2065: 'CALLBACK' : undeclared identifier
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(183) : error C2065: 'PF_DETOUR_BINARY_BYWAY_CALLBACK' : undeclared identifier
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\detours.h(183) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>Build log was saved at "file://c:\Documents and Settings\Main\My Documents\Visual Studio 2005\Projects\NewDllLauncher\NewDllLauncher\Debug\BuildLog.htm"
1>NewDllLauncher - 58 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I appreciate any help!
#1 · 16y ago
cnttuchme
cnttuchme
Ok yes theres a problem with your code in detours.h
Paste the code in detours.h here...There is a problem with your header file
#2 · edited 16y ago · 16y ago
stevethehacker
stevethehacker
lmao I have seen that code before
#3 · 16y ago
why06
why06
Quote Originally Posted by cnttuchme View Post
Ok yes theres a problem with your code in detours.h
Paste the code in detours.h here...There is a problem with your header file
Lol. You wouldn't wnat to post all of detours.h here that's a huge SDK that has to be downloaded form Microsoft. Let's see what the problem is...
#4 · 16y ago
cnttuchme
cnttuchme
Quote Originally Posted by why06 View Post
Lol. You wouldn't wnat to post all of detours.h here that's a huge SDK that has to be downloaded form Microsoft. Let's see what the problem is...
Wow Microsoft fail.
Hrmm well my colledge im going to says that im i learn alot of programming then there going to set me up with a job at Microsoft lol.
#5 · 16y ago
why06
why06
Hmmm... well he's not posting all the code. The errors don't match the code he supplied. If you want us to help you your going have to provide the whole thing. If you want me to I will even delete the source when we are done if you don't want it leeched.
#6 · 16y ago
stevethehacker
stevethehacker
ya and why the fuck does it say visual studio 2008 in error's if he is using visual studio 2005.and why use either of those?dev c++ is the way to go
#7 · 16y ago
Hell_Demon
Hell_Demon
Quote Originally Posted by cnttuchme View Post
Wow Microsoft fail.
Hrmm well my colledge im going to says that im i learn alot of programming then there going to set me up with a job at Microsoft lol.
You really do not want to work for the biggest fails in history of mankind o__O.
Their list of fails is bigger then the amount of leechers and copy pasters on all hack sites together!

Quote Originally Posted by stevethehacker View Post
why use either of those?dev c++ is the way to go
dev C++ fails...
Go make an engine hook with it and you'll find out(especially if you're gonna do the source engine)
#8 · 16y ago
why06
why06
Hmmmm... how to put this? HD how r u me o_O?
#9 · 16y ago
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

  • [HELP] making UCE compile errorBy herowarz in Suggestions, Requests & General Help
    6Last post 18y ago
  • compile error :/ from [Writing your own C++ Trainer]By FantaBrause in C++/C Programming
    7Last post 17y ago
  • Get Compileing Error!By BMW M5 in C++/C Programming
    0Last post 16y ago
  • Compiling errors.By Calebb in C++/C Programming
    4Last post 16y ago
  • Help WarRock compile errorBy djxorwkd11 in C++/C Programming
    2Last post 16y ago

Tags for this Thread

#compile#detoursh#errors