473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Memory locations in other programs

In a Win32 API environment, how would I go about finding the memory
location of a specific text box in another running, closed source
application? I need to read/write from a few boxes in the program from
time to time.

Thanks for any help or pointers (no pun intended).

Jon

Oct 17 '05 #1
2 1353
Hi,

Try to use the following API's to read/write a process's memory:

OpenProcess()
VirtualQueryEx()
ReadProcessMemory()
WriteProcessMemory()
GetProcessWorkingSetSizeEx()

http://msdn.microsoft.com/library/de...penprocess.asp

http://msdn.microsoft.com/library/de...ualqueryex.asp

http://msdn.microsoft.com/library/de...cessmemory.asp

http://msdn.microsoft.com/library/de...cessmemory.asp

http://msdn.microsoft.com/library/de...gsetsizeex.asp

Hope these information helps,

Kellie.

Oct 17 '05 #2

<le*****@insight.rr.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
In a Win32 API environment, how would I go about finding the memory
location of a specific text box in another running, closed source
application? I need to read/write from a few boxes in the program from
time to time.
Hmm.. for that you would need kernel code that is able to see detect the
structure of the program in memory and how any relevan DLL's may have
been relocated in memory. But, unless your kernel drive gives the data
to you directly (or change your process' security) you won't have access
to the string from your process.

You could also try to enumerate the windows and the childs and then use
GetWindowText() passing it the address of a global memory area which
you know (by means of global DLL code injection) is in a fixed virtual
memory location in both (or all) processes.
Thanks for any help or pointers (no pun intended).


Here is a pointers for more discussion on the matter:
msdn.microsoft.com/library and www.google.com
....the Search field in both....

- Sten
Oct 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: fabio de francesco | last post by:
Hi what do you think of the following? Why are we permitted to do that? And why the C++ Library doesn't stop someone willing to perfom that assignement (*a = 20)? #include <iostream> ...
8
by: vikram | last post by:
i have series of questions 1.How a c program is loaded in memory i mean the whats is the structure that the code segment?? data segment?? 2.When you say const int *p; where is p...
18
by: jacob navia | last post by:
In C, we have read-only memory (const), read/write memory (normal data), and write only memory. Let's look at the third one in more detail. Write only memory is a piece of RAM that can only...
5
by: bull | last post by:
hi could any one explain with example the following in a better way to understand 1. what is stack in memory, how the programs are stored in stack , what is the use of stack 2. What is heap in...
5
by: Alfonso Morra | last post by:
Hi, I am writing a messaging library which will allow me to send a generic message structure with custom "payloads". In many cases, a message must store a non-linear data structure (i.e....
26
by: Bill Reid | last post by:
Bear with me, as I am not a "professional" programmer, but I was working on part of program that reads parts of four text files into a buffer which I re-allocate the size as I read each file. I...
39
by: Ravi | last post by:
Can you all please suggest a program which tell us the range of memry addresses occupied by the given c program?
8
by: Gary | last post by:
When you declare an array of chars and store a string in it, where is the position of the null character \0? And what happens to the unused memory locations? #include <stdio.h> int main(void)...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.