|
I was expecting a technical explanation. Would you please give me some technical explanation about how it changes?
|
|
|
|
|
Why would you expect them to remain the same in a game that is running?
I have no idea what game you are trying to cheat, but you are reading the memory of a different process, so it will get run, stopped, loaded, unloaded, cached, paged to disk, and generally have a hard life - all at the whim of the operating system. Add in that the game itself will probably be moving stuff around as it runs to suit itself, and the chances of you finding exactly what you want without the source code to work form is very unlikely. And that is assuming that you have identified the actual linked list, rather than some stack based object that temporarily looked like an element that might be on a linked list, if the code actually used one.
So why would you expect everything to stay in the same place for your convenience?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
If you have to ask this, then I doubt that the address you're reading is what you think it is. Not to mention what it points to. Every process uses it's own mapping from it's address space to the underlying physical addresses, and the system functions take care that each address used within a process is mapped accordingly: to some location within the momry space that is associated to this, and only this, process!
Consequently, a process can never access memory from another process, unless the two processes are set up specifically for that purpose: the only way I know to read memory from another process is setting up shared memory. And I doubt that your game allows this.
Take this with a grain of salt and a big AFAIK - I'm anything but a specialist on this topic
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
I'm new to MFC VC++ and trying to create a dialog base simple MFC application that display the data contains in MySQL database. Please guide me through this.
Thank you.
|
|
|
|
|
You can find here[^] a project sample of how to connect to MySQL database through ODBC ... in fact, to any kind of dababase through ODBC.
|
|
|
|
|
Thank you.
Could you please suggest me a good book for MFC vc++.
|
|
|
|
|
|
Thanks for the help!
I'am having trouble understanding why it does this
BOOL CMyApp::InitInstance(){
..........
..........
CWinApp::InitInsatnce();
..........
..........
}
Could you please explain why do we need to call two InitInstance() and what is the main reason?
|
|
|
|
|
When you derive from a class and override one of its methods, it's common, and sometimes required, to call the base class implementation.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Thanks for the reply.
If you don't mind, could you please elaborate the "sometime required, to call the base class implementation" part with some example.
|
|
|
|
|
CMyApp is derived from CWinApp , so the line
CWinApp::InitInsatnce();
simply call the InitInstance method from parent CWinApp , which is the base implementation of CMyApp::InitInstance() .
"sometime required" sometime is necesarry to call this base implementation, sometime not 
|
|
|
|
|
Thanks
I am creating a simple MFC application. That has a search box which accept both string and integers to retrieve data from the Mysql database and display in the list box.
Please guide me how to create a search box that accepts when entered string and when entered integers.
|
|
|
|
|
Anything you type into a text box is a string, whether letters, numbers or special characters. If you want to use numeric text as integer values then you need to convert them with one of the conversion methods. See Data Conversion | Microsoft Docs[^].
|
|
|
|
|
Thank you for the information .
|
|
|
|
|
Hello,
I created an MFC dialog application which is connected to MySql database. I wanted to create a search button/Search query for database.
Could you give me some pointers for creating functions for the same which accept string as well as Integers. Thanks.
I've read about atoi(), but still having problem.
And for displaying the search result, which one is better to use listbox or listcontrol.
|
|
|
|
|
If you have more than one column data to display, I would use CListCtrl[^] or CMFCListCtrl[^]
If you want to use an edit to use it for SQL statement, then give more details about what you intend to do there (e.g. sold > 1000 ?)
|
|
|
|
|
SQl is not greater than 1000. I wanted to create a simple application first. Like for example.. I have a table with ID(primary Key), Name, DOB...etc columns.
What I wanted to create is a search box in the dialog application. when I type the Name in the search box it will display the result in the listbox/list control box. Similarly when I enter the ID in the search box it will return the same.
|
|
|
|
|
You can use CListCtrl or derivated to display db data.
In search box you can test the user input with is_digit[^] and act accordingly (if is number then use ID to get data, or if is not number, use string to get the name and so on.
|
|
|
|
|
Thank you for always helping. I really appreciate the help
I have created a search function and now it's displaying in the CListCtrl and working the way I wanted.
I'll try to extend the functionality like if I select the result in the CListCtrl it will take me to another dialog that contains the details of the selected. If I have any doubt i'll post it here.
Thanks again 
|
|
|
|
|
You are welcome 
|
|
|
|
|
Hello I'm back again
How to get all the data present in a row displayed in the ListCtrl from the database and display those data in the next dialog?
For example:- There are name, age,dob..etc in a row.. when I select this row and press the select button.. It will take me to another where all this details will be display.
If you don't mind could you please give example.
Thanks.
|
|
|
|
|
Then you take all your list control data with CListCtrl::GetItemText[^] and you simply put them into next dialog, just like that:
CNextDlg dlg;
dlg.m_sName = m_ListCtrl.GetItemText(...);
dlg.m_sAge = m_ListCtrl.GetItemText(...);
dlg.m_sDOB = m_ListCtrl.GetItemText(...);
dlg.DoModal();
|
|
|
|
|
Thank you.
void CMyDlg::ResetListControl() {
m_ListControl.DeleteAllItems();
int iNbrOfColumns;
CHeaderCtrl* pHeader = (CHeaderCtrl*)m_ListControl.GetDlgItem(0);
if (pHeader) {
iNbrOfColumns = pHeader->GetItemCount();
}
for (int i = iNbrOfColumns; i >= 0; i--) {
m_ListControl.DeleteColumn(i);
}
}
I particularly don't understand this line :
CHeaderCtrl* pHeader = (CHeaderCtrl*)m_ListControl.GetDlgItem(0);
Could you please explain this line of code. Thanks 
|
|
|
|
|
I think that line should be:
CHeaderCtrl* pHeader = m_ListControl.GetHeaderCtrl();
See here[^].
However, that line retrieve first control item from m_ListCtrl object ... does working that line ? I didn't met such approach ...
|
|
|
|
|
Confidence that I have solved all strange errors here, I come back with some issue generated by a legacy C code for linux, code that I intend to use it in a MFC app in windows OS.
Ok. I have a simple code:
int nRespond = _open(device, 020);
UINT err = ::GetLastError();
where devide is const char* and has value C (or D:, or E: )
The nRespond is -1 and err has value 5, which is mean Access is denied . What could be the problem here ? I ran the test app as administrator mode (ran from VS2017 as admin mode).
|
|
|
|