Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-16-2005, 04:49 AM   #1 (permalink)
madtown54
Registered User
 
Join Date: Mar 2005
Posts: 1
madtown54 is on a distinguished road
Accessing a specific memory address

I am creating a trainer for a game and I need to be able to read and write to a specific memory location. My first attempt was as follows:

int main(int argc, char *argv[]) {
int *num1;
void *p;
p = reinterpret_cast< void* > (0x04e27e74);
num1 = (int*)p;
printf("0x4e27e74=0x%x\n", *num1);
return 0;
}

but every time I run the code to see what is in the memory location I get an access violation exception. I though of using MK_FP, but I do not know what the segment address of this memory address is or how to figure it out.

Basically the above code segment is what I want to do, except I also want to write to the specific location, but it does not work. All sugestions are welcomed.

Madtown54
madtown54 is offline  
Old 03-16-2005, 06:17 AM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Funny, mixing C++ with C.

Mad, I'll tell you what.
I am an adult, but I have tons of games behind me on the shelf which I love to play online. Loved. Almost every game is messed up by cheaters. It makes me sick. I can afford a few games a year, but youngsters need to do more to purchase a license. And then their fun-investment goes to waste by "peeps" who cheat.

I'll remain calm, but I"ll close this topic asap. And that's a lot of anger from my side if you knew me
__________________
Valmont is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Class using a specific instance of another class? is this possible? abs Standard C, C++ 5 02-08-2005 04:12 PM
Problem with Memory (EXC_BAD_ACCESS) m8j Standard C, C++ 1 11-18-2004 04:50 AM
Linking to specific frames in a frameset Duncan HTML, XML, Javascript, AJAX 8 05-25-2004 10:15 AM


All times are GMT -8. The time now is 06:31 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting