Thread: mapped section, struct copy

  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 01:53 AM.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    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, 09:42 AM
  4. Concatenating in linked list
    By drater in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 11:10 PM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM