Results 1 to 8 of 8

Thread: VERY HARD Pointer Question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    VERY HARD Pointer Question

    Ok I want to know how to get data at an addresss, or i dont know the address in memory but i know where it starts and i am looking for a value. I am looking for something that starts at ffff:0000 How can i scan the data starting at this address.
    EX
    go to msdos and type debug then type d ffff:0000 and press enter

    I want to be able to look at any memory address on my computer

  2. #2
    Zaei
    Guest
    Code:
    BYTE* p = 0xffff0000;
    cout << *p << endl;
    Be careful of where you use that, Im not sure if you will get access violations if you try to dereference memory outside of your process.

    Z.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    borland

    ok im useing Turbo C++ for dos so I dont have the byte variable type. So i set it as an unsigned long

    EX

    unsigned long *moo = 0xffff0000;
    cout << *moo << endl;

    and i get an error, saying i can not convert unsigned long to unsigned long * any ideas?

  4. #4
    New Member
    Join Date
    Mar 2002
    Location
    BC, Canada
    Posts
    5
    Maybe you need to #include something to get the BYTE data type? check out MSDN
    Joel Kitching - [email protected]

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313
    I am useing a c++ for DOS a compiler that was written back in 1990...so dont think MSDN will know what i am talking about i am not useing Visual C++.

  6. #6
    Zaei
    Guest
    Change BYTE to char. You will also have to worry about far pointers. Your compiler should have come with help files, and you should do a bit of searching on the net for 16 bit pointers (my code uses 32 bit pointers).

    Z.

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    If you're running any program under Windows you won't have access to memory outside of your program (DOS ones can sometimes get away with it for certain addresses).

    The best thing is to write a virtual device driver (vxd) which can access any 32-bit memory address at will
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    Zaei
    Guest
    There might be Win32API functions to read and write memory at any location, but Im not sure (i think i remember something like this). Take a look around the MSDN.

    Z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width