Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    Dave84311's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    The Wild Wild West
    Posts
    35,837
    Reputation
    5782
    Thanks
    41,292
    My Mood
    Devilish

    C++ Trainer Skeleton

    Probably one of the simplest skeletons I've got:

    Code:
    #include <windows.h>
    #include <stdio.h>
    
    int main(){
    
      HANDLE hProcess = 0;
    
      HWND hWindow;
      DWORD pid = 0;
    
      hWindow = FindWindow(NULL, "Window Name");
      if (hWindow){
         GetWindowThreadProcessId(hWindow, &pid);
      }
    
      hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
    
      if(hProcess != NULL)
         printf("Process Found!");
      else {
         printf("Process Not Found!");
         return 0;
      }
     
      //Writes byte values to 0x00567...
      BYTE valueToWrite[] ={0x90, 0x90};
      WriteProcessMemory(hProcess, (void*)0x00567A8F, (void*)&valueToWrite, sizeof(valueToWrite), NULL);
    
      return 0;
    }
    Its really handy if you want to make your own trainer. You of course need to know how to use it





    THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE


    "First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311

    HAVING VIRTUAL DETOX

  2. #2
    Firey's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Posts
    44
    Reputation
    28
    Thanks
    22
    this isn't c++ is just "C"

  3. #3
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,703
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw
    ROFL. Just ROFL.



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


  4. #4
    RebornAce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    Deep Six
    Posts
    425
    Reputation
    110
    Thanks
    64
    ROFLCOPTER DOWN. dontcha mean? :P

  5. #5
    Dave84311's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    The Wild Wild West
    Posts
    35,837
    Reputation
    5782
    Thanks
    41,292
    My Mood
    Devilish
    Quote Originally Posted by Firey
    this isn't c++ is just "C"
    It is C++.





    THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE


    "First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311

    HAVING VIRTUAL DETOX

  6. #6
    Firey's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Posts
    44
    Reputation
    28
    Thanks
    22
    c++ = cout << "";
    c = printf ""

  7. #7
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,703
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw
    If, I remember correctly, with my limited knowledege of C++, printf is useable in C++ and C#.

    Dave kept trying to make me use printf instead of std::cout << ""



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


  8. #8
    Firey's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Posts
    44
    Reputation
    28
    Thanks
    22
    well, you can code C in V C++ but its just like javascript, HTML and Javascript can be coded together.

    Any c++ tutorial uses cout <<
    any c tutuorial uses printf

  9. #9
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,703
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw
    Yeah, but the headers use the C++ format.

    Maybe its a hybrid C#+!



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


  10. #10
    shercipher's Avatar
    Join Date
    Dec 2005
    Posts
    108
    Reputation
    10
    Thanks
    14
    I hate to break it to you, that is typical C. But not because of the reason he provided, because you can use printf() in both C and C++.

    But there is nothing C++ specific in there; no references, classes, object orientation, or instantiation. In other words, it is C, because you can plug this code into an ANSI C compiler and it would still run.

    And C# has nothing to do with this; in fact that is incorrect C# syntax.

    EDIT: And by the way, both C and C++ use the same header include system.
    This is a telltale sign of C:

    #include <stdio.h>

    This is a telltale sign of C++:

    #include <iostream> //note there is no .h
    using namespace ...; //C does not use namespaces

  11. #11
    Dave84311's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    The Wild Wild West
    Posts
    35,837
    Reputation
    5782
    Thanks
    41,292
    My Mood
    Devilish
    I added that... "printf();" bit. It was originally a large chunk of code stripped down. C, works with C++ because they are esentially the same thing. One is just a little more complicated.

    Anyways, the bit about the header files isn't completely correct. Unless its a "compiler included header" it can't be used without the .h at the end. Anyways its good programming to include a .h at the end of every header





    THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE


    "First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311

    HAVING VIRTUAL DETOX

  12. #12
    shercipher's Avatar
    Join Date
    Dec 2005
    Posts
    108
    Reputation
    10
    Thanks
    14
    Actually, according to the latest C++ standard, you are supposed to leave out .h on STD libraries. The reason is because those with .h are being deprecated.

    If you doubt me, go into Code::Blocks and type in a simple application with <iostream.h> and it will give you a deprecation warning.

    ie...

    #include <iostream>
    using namespace std;
    int main() {
    cout<<"hi!\n";
    return 0;
    } //no deprecation warning

    #include <iostream.h>
    int main() {
    cout<<"hi!\n";
    return 0;
    } //deprecation warning

  13. #13
    Dave84311's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    The Wild Wild West
    Posts
    35,837
    Reputation
    5782
    Thanks
    41,292
    My Mood
    Devilish
    I'm using VS 2003 and I never get deprecation warnings for that.





    THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE


    "First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311

    HAVING VIRTUAL DETOX

  14. #14
    clone's Avatar
    Join Date
    Dec 2005
    Posts
    1
    Reputation
    10
    Thanks
    0

    Thanks 4 replying.

    i'm software eng., i'm a student.
    so i would like to know more about programming, i mean to build a system. my projet last year is on xml, and file maker pro. ca u help me out???

  15. #15
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,703
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw
    It's heating up in here, I am a C++ dropout!



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


Page 1 of 3 123 LastLast

Similar Threads

  1. Neopets - NeoQuest II Trainer
    By sockopen in forum Visual Basic Programming
    Replies: 12
    Last Post: 07-03-2007, 01:19 PM
  2. The Warrock Trainer
    By tomvernons in forum WarRock - International Hacks
    Replies: 4
    Last Post: 02-05-2006, 01:23 AM
  3. (SEARCHING)WarRock Trainer
    By User Namem in forum Hack Requests
    Replies: 11
    Last Post: 02-02-2006, 07:48 PM
  4. Trainer?
    By outrage20 in forum Gate To Heaven Hacks
    Replies: 1
    Last Post: 01-17-2006, 05:52 AM
  5. MPGH Warrock Trainer v1.010206
    By Dave84311 in forum WarRock - International Hacks
    Replies: 21
    Last Post: 01-10-2006, 06:41 PM