mapped section, struct copy

This is a discussion on mapped section, struct copy within the C++ Programming forums, part of the General Programming Boards category; can there be a problem if i try to copy data from a mapped buffer: IMAGE_DOS_HEADER idh; memcpy(&idh,(PVOID)(VirutalAddress+a),sizeof(idh)) ; i ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    37

    mapped section, struct copy

    can there be a problem if i try to copy data from a mapped buffer:
    IMAGE_DOS_HEADER idh;
    memcpy(&idh,(PVOID)(VirutalAddress+a),sizeof(idh)) ;

    i just know if it filles DWORD's the bits are in the wrong place. it means for example PE singature is 0x4550 instead of 0x5045

    btw how i can change the bit order?
    Last edited by punkywow; 10-22-2009 at 02:53 AM.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Look up "endianness".

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    37
    nice thnx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory issue
    By t014y in forum C Programming
    Replies: 2
    Last Post: 02-21-2009, 12:37 AM
  2. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  3. Looking for constructive criticism
    By wd_kendrick in forum C Programming
    Replies: 16
    Last Post: 05-28-2008, 10:42 AM
  4. Concatenating in linked list
    By drater in forum C Programming
    Replies: 12
    Last Post: 05-03-2008, 12:10 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21