Results 1 to 9 of 9
  1. #1
    beeker's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    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!

  2. #2
    cnttuchme's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    NA
    Posts
    187
    Reputation
    11
    Thanks
    49
    My Mood
    Inspired
    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
    Last edited by cnttuchme; 10-18-2009 at 06:23 PM.

    Help me raise The roof


    Respected list
    [MPGH]Liz
    kvdirect
    [MPGH]why06

    The following was an idea to let eachother ingame secretly know that your hack.

    Quote Originally Posted by kingkuz00 View Post
    how about we "dave is the king" when we join a game :P
    Quote Originally Posted by aram0492 View Post
    how about "aram is the king" who the fk is dave?
    idk i rofled.

    Save Gunz section "https://www.mpgh.net/forum/297-gunz-g...od-minion.html"

  3. #3
    stevethehacker's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    USA bitch
    Posts
    416
    Reputation
    14
    Thanks
    51
    My Mood
    Bored
    lmao I have seen that code before

  4. #4
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    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...

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  5. #5
    cnttuchme's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    NA
    Posts
    187
    Reputation
    11
    Thanks
    49
    My Mood
    Inspired
    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.

    Help me raise The roof


    Respected list
    [MPGH]Liz
    kvdirect
    [MPGH]why06

    The following was an idea to let eachother ingame secretly know that your hack.

    Quote Originally Posted by kingkuz00 View Post
    how about we "dave is the king" when we join a game :P
    Quote Originally Posted by aram0492 View Post
    how about "aram is the king" who the fk is dave?
    idk i rofled.

    Save Gunz section "https://www.mpgh.net/forum/297-gunz-g...od-minion.html"

  6. #6
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    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.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  7. #7
    stevethehacker's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    USA bitch
    Posts
    416
    Reputation
    14
    Thanks
    51
    My Mood
    Bored
    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

  8. #8
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    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)
    Ah we-a blaze the fyah, make it bun dem!

  9. #9
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Hmmmm... how to put this? HD how r u me o_O?

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

Similar Threads

  1. Help WarRock compile error
    By djxorwkd11 in forum C++/C Programming
    Replies: 2
    Last Post: 03-08-2010, 07:37 AM
  2. Compiling errors.
    By Calebb in forum C++/C Programming
    Replies: 4
    Last Post: 01-25-2010, 01:08 AM
  3. Get Compileing Error!
    By BMW M5 in forum C++/C Programming
    Replies: 0
    Last Post: 11-15-2009, 02:16 AM
  4. compile error :/ from [Writing your own C++ Trainer]
    By FantaBrause in forum C++/C Programming
    Replies: 7
    Last Post: 07-06-2009, 11:09 PM
  5. [HELP] making UCE compile error
    By herowarz in forum Suggestions, Requests & General Help
    Replies: 6
    Last Post: 02-03-2008, 12:35 AM

Tags for this Thread