Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Quick Paid Job for anyone?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
krumpy
How do I cheat?
Reputation: 0

Joined: 15 Nov 2016
Posts: 3

PostPosted: Wed Nov 16, 2016 12:28 am    Post subject: Quick Paid Job for anyone? Reply with quote

Heyo,

Sorta new to c++ and CE just looking for quick help obtaining base address from a quote feed, checked out a heap of online tuts, but still having trouble getting base static address..

Happy to pay for work! send me a PM for more details Smile

Kind Regards,
Krumpy
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Wed Nov 16, 2016 4:36 am    Post subject: Reply with quote

I'll help you for free. Paste the details here
_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
krumpy
How do I cheat?
Reputation: 0

Joined: 15 Nov 2016
Posts: 3

PostPosted: Wed Nov 16, 2016 5:00 am    Post subject: Reply with quote

Need help grabing quotes from meta trader and more platforms in the future so would like to msg chat if possible.. (.dll project)

Just looking to read memory and return the value:
Code:

#include "stdafx.h"
#include<Windows.h>

int Sum () {
   
   double readTest = 0;
   HWND hwnd = FindWindowA(NULL, "699906: Pepperstone-Demo01 - Demo Account");
   if(hwnd == NULL){
      return 1;
   }
   else{
      DWORD procID;
      GetWindowThreadProcessId(hwnd, &procID);
      HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);

      if(procID == NULL){
         return 2;
      }
      else{

         ReadProcessMemory(handle, (PBYTE*)0x0133BB4C, &readTest, sizeof(double), 0);
         readTest = readTest * 100000;
         return readTest;
      }
   }

}



Just need an example of how to point to static address and how to easily find it.. Do you have skype or slack? will swing some money Smile Looking for the EURUSD bid value for now Smile anyhelp would be amazing <3 If we can work together via teamviewer I can assist more on what I require Smile
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Nov 16, 2016 1:45 pm    Post subject: Reply with quote

I'd suggest using better API than FindWindow to get the process ID. Judging by that window title, its going to change either frequently or enough that the one you use is not going to be reliable. You can get the process id via things like:
- CreateToolhelp32Snapshot
- Process32First / Process32Next

From there you can get the base address via:
- Module32First / Module32Next

You can do something like this to get the info:
Code:

uint32_t getTargetProcessId(const char* processName)
{
    PROCESSENTRY32 pe32 = { sizeof(PROCESSENTRY32) };

    // Obtain a snapshot of the current process list..
    auto snapshot = ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
    if (snapshot == INVALID_HANDLE_VALUE)
        return 0;

    // Ensure we can obtain the first process..
    if (!::Process32First(snapshot, &pe32))
    {
        ::CloseHandle(snapshot);
        return 0;
    }

    do
    {
        // Locate notepad.exe running..
        if (_stricmp(pe32.szExeFile, processName) == 0)
        {
            ::CloseHandle(snapshot);
            return pe32.th32ProcessID;
        }
    } while (::Process32Next(snapshot, &pe32));

    ::CloseHandle(snapshot);
    return 0;
}


You can then use this to get the process id like this:
Code:

auto processId = getTargetProcessId("notepad.exe");


Next, you want to avoid things like PROCESS_ALL_ACCESS, using the ALL_ACCESS flags have different meanings on systems between Windows XP and Windows 10. Depending on the users current access rights, this can fail and just return nothing. Instead, you should give the exact flags of what you want to do, so you can redo your open process call like this:

Code:

auto processId = getTargetProcessId("notepad.exe");
if (processId == 0)
    return 0;
   
auto handle = ::OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ, FALSE< processId);
if (handle == INVALID_HANDLE_VALUE)
    return 0;

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
krumpy
How do I cheat?
Reputation: 0

Joined: 15 Nov 2016
Posts: 3

PostPosted: Wed Nov 16, 2016 2:24 pm    Post subject: Reply with quote

Cheers, for the example.. Hoping this is enough info, to get me going.. As mentioned pretty new with C++.. Any chance you have this project pre-built? I know there is no learning from copy paste but this is step #1 on what I require from the project. already spent 4 days trying to get it get base address working and was going to move at looking at the title issue.

Also what's the best platform to work with I'm currently using Visual C++ 2010, would this matter as I've read some library are auto included in the latest 2015 version.. and some examples of the methods you mentioned are console based applications.. Sorry again for being nub, but C++ can be pretty needy with what she does and doesn't wanna compile.

As mentioned, happy to pay if I can work with someone over messenger Smile This is only a very small part of my project so would rather just get an expert to assist (paid if needed) and I'll handle the other more familiar languages it is being ported to. thanks again <3
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Nov 16, 2016 6:56 pm    Post subject: Reply with quote

I personally keep up to date with Visual Studio, I use Visual Studio 2015 w/ Update 3. I also have the latest Visual Studio 15 (currently in beta testing) on my laptop to test out and such. I'd suggest keeping up to date with Visual Studio if you are focusing on C++ as well as Windows development in general.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites