Compile c++

This is a discussion on Compile c++ within the Warcraft 3 forum board part of the Hot Games category; i have a more or less stupid question: i´ve seen this ( http://www.skillhackerz.com/Chaotic/.../Mh1/index.htm ) tutorial and got stuck @ compiling ...

Results 1 to 10 of 10
  1. #1
    t0pline- is offline Member
    Array
    Join Date
    Aug 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    5

    Compile c++

    i have a more or less stupid question:
    i´ve seen this (http://www.skillhackerz.com/Chaotic/.../Mh1/index.htm) tutorial and got stuck @ compiling the cpp program
    because i dont remember the console command for compiling
    i tried "cl programname.cpp" and "gcc programname.cpp" and also
    "cc programname -o programmname.cpp" ... nothing worked
    i searched the whole web (not the whole^^) but didnt find

    if you know the command please can you post it ? i would be very thankful!



    EDIT: everything works fine, just need winfows.h

    Last edited by t0pline-; 09-28-2007 at 03:24 PM.

  2. #2
    kostx is offline Newbie
    Array
    Join Date
    Jun 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0
    I can compile for you. Give me the code. Just make here a code block and post the C++ code. When I will upload the exe

  3. #3
    t0pline- is offline Member
    Array
    Join Date
    Aug 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    5
    i could compile myself, i just need the file windows.h ...
    i couldnt find it could you upload this file?

  4. #4
    ZeD's Avatar
    ZeD
    ZeD is offline RoR 0x266E


    Array
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    1,440
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    14
    Reputation
    698
    here it is:
    Attached Files
    Last edited by ZeD; 09-28-2007 at 03:58 PM.

  5. #5
    t0pline- is offline Member
    Array
    Join Date
    Aug 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    5
    jeeeeah nice thank you man!




    I got all files, can anyone post the right source code? mine doesnt work, see it here:

    Code:
    // wc3.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
    //
    
    /*****************************************************************
    
    *Made by Chaotic                                                 *
    
    *Shoutouts to: Exzap, Alpha_Hacka & xliqz^                       *
    
    *www.SkillHackerZ.com                                            *
    
    *Remember: Don't use it in Laddergames because it is not allowed!*
    
    *Only with friends                                                                                                                                                      *
    
    ******************************************************************/
    
    
    #include "stdafx.h"
    #include <windows.h> 
    
     
    
    void EnableDebugPriv(); 
    
     
    
    int main()
    
    {
    
        //We have to set debug privileges for our app to be allowed to OpenProcess (war3.exe)
    
        EnableDebugPriv();
    
        //Get a Handle on Warcraft III window
    
        HWND hwar3 = FindWindow("Warcraft III",NULL);
    
        if (!hwar3) //If we can't find the window...
    
        {
    
            MessageBox(0, "Run Warcarft III First!", "", MB_OK);        
    
            return false;
    
        }
    
        DWORD pid;
    
        GetWindowThreadProcessId(hwar3, &pid);    
    
        HANDLE hopen = OpenProcess(PROCESS_ALL_ACCESS, false, pid);
    
        if (!hopen) //Can't open Warcarft III's process.. Must be a PID error.
    
        {
    
                                MessageBox(0, "Your getting a PID error, use LoaderZ.", "", MB_OK);
    
                                return false;
    
        }
    
     
    
        //Now we're ready to change the memory!  
    
        //We remember:  6F2A3B91   66:BF 0F00     MOV DI,0x0F    
    
        BYTE data[] = {0xBF,0x0F,0x00};    
    
        bool success = WriteProcessMemory(hopen,(LPVOID)0x6F2A3B92, &data,3, NULL); 
    
     
    
                  if(success)//Everything worked
    
                      MessageBox(NULL, "Hack Loaded - Remember to Vist www.SkillHackerZ.com", "", MB_OK);
    
                  else//There was an error!
    
                      MessageBox(NULL, "Couldn't load hack", "", MB_OK);
    
     
    
        // Remember to be clean
    
         CloseHandle(hopen);
    
        //Done!
    
        return true;
    
    } 
    
     
    
     
    
     
    
    void EnableDebugPriv()
    
    {    
    
        HANDLE hToken;    
    
        LUID sedebugnameValue;    
    
        TOKEN_PRIVILEGES tkp;
    
        OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
    
        LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &sedebugnameValue);
    
        tkp.PrivilegeCount = 1;    
    
        tkp.Privileges[0].Luid = sedebugnameValue;    
    
        tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
    
        AdjustTokenPrivileges(hToken, false, &tkp, sizeof tkp, NULL, NULL);
    
        CloseHandle(hToken);
    
    }
    ps: i got the header files (stdafx.h and windows.h) in the folder, the program seems not to find it

    fatal error C1083: Datei (Include) kann nicht geöffnet werden: "windows.h": No such file or directory
    Last edited by t0pline-; 09-28-2007 at 05:11 PM.

  6. #6
    Blaze's Avatar
    Blaze is offline Premium Member
    Array
    Join Date
    Feb 2007
    Posts
    1,691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    12
    Reputation
    228
    If someone hands you the source then it isnt really your mh lol

  7. #7
    t0pline- is offline Member
    Array
    Join Date
    Aug 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    5
    Quote Originally Posted by Blaze View Post
    If someone hands you the source then it isnt really your mh lol
    wooot i dont say this and i dont say its my maphack!
    i just wanna try the compiled exe if it works LOL

  8. #8
    Bertel's Avatar
    Bertel is offline Premium Member
    Array
    Join Date
    Sep 2007
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    36
    The code seems to be ok.
    Do you coppied the files into the folder where you have the scource or where you installed your c compiler.

    Maybe you just can try to install an other compiler x> or try to write your own scource. It's not as complicated as it sounds (there are even commentars :>)
    Maybe i'm just mad but maybe i'm only a bit different.

  9. #9
    t0pline- is offline Member
    Array
    Join Date
    Aug 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    5
    y, i will try it myself

  10. #10
    Chaotic is offline Guru
    Array
    Join Date
    Feb 2007
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    11
    Reputation
    162
    Quote Originally Posted by t0pline- View Post
    y, i will try it myself
    Use Dev-c++ or install the windows sdk on your computer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •