| View previous topic :: View next topic |
| Author |
Message |
krumpy How do I cheat?
Reputation: 0
Joined: 15 Nov 2016 Posts: 3
|
Posted: Wed Nov 16, 2016 12:28 am Post subject: Quick Paid Job for anyone? |
|
|
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
Kind Regards,
Krumpy
|
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Wed Nov 16, 2016 4:36 am Post subject: |
|
|
I'll help you for free. Paste the details here
_________________
|
|
| Back to top |
|
 |
krumpy How do I cheat?
Reputation: 0
Joined: 15 Nov 2016 Posts: 3
|
Posted: Wed Nov 16, 2016 5:00 am Post subject: |
|
|
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 Looking for the EURUSD bid value for now anyhelp would be amazing <3 If we can work together via teamviewer I can assist more on what I require
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Nov 16, 2016 1:45 pm Post subject: |
|
|
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 |
|
 |
krumpy How do I cheat?
Reputation: 0
Joined: 15 Nov 2016 Posts: 3
|
Posted: Wed Nov 16, 2016 2:24 pm Post subject: |
|
|
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 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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Nov 16, 2016 6:56 pm Post subject: |
|
|
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 |
|
 |
|