ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

pe.h
Go to the documentation of this file.
00001 #ifndef _LIBMACH_PE_H_
00002 #define _LIBMACH_PE_H_
00003 
00004 #include "compat.h"
00005 
00006 struct DwarfBlock;
00007 typedef struct _IMAGE_SECTION_HEADER PeSect;
00008 
00009 typedef struct _CoffSymbol {
00010     ulong address;
00011     char *name;
00012 } CoffSymbol;
00013 
00014 typedef struct _Pe {
00015     void *fd;
00016     u16int (*e2)(const unsigned char *data);
00017     u32int (*e4)(const unsigned char *data);
00018     u64int (*e8)(const unsigned char *data);
00019     ulong imagebase, imagesize, loadbase;
00020     ulong nsymbols;
00021     CoffSymbol *symtab;
00022     int (*loadsection)(struct _Pe *pe, char *name, struct DwarfBlock *b);
00023     int nsections;
00024     struct _IMAGE_SECTION_HEADER *sect;
00025 } Pe;
00026 
00027 #define E_SYMNMLEN 8
00028 #include <pshpack1.h>
00029 typedef struct {
00030     union {
00031         char e_name[E_SYMNMLEN];
00032         struct {
00033             unsigned long e_zeroes;
00034             unsigned long e_offset;
00035         } e;
00036     } e;
00037     unsigned long e_value;
00038     short e_scnum;
00039     unsigned short e_type;
00040     unsigned char e_sclass;
00041     unsigned char e_numaux;
00042 } SYMENT, *PSYMENT;
00043 #include <poppack.h>
00044 
00045 #define C_EXT 2
00046 #define C_STAT 3
00047 #define DT_FCN 0x40
00048 
00049 Pe *peopen(const char *name);
00050 int loaddisksection(struct _Pe *pe, char *name, struct DwarfBlock *b);
00051 int loadmemsection(struct _Pe *pe, char *name, struct DwarfBlock *b);
00052 u16int peget2(const unsigned char *ptr);
00053 u32int peget4(const unsigned char *ptr);
00054 u64int peget8(const unsigned char *ptr);
00055 void pefree(struct _Pe *pe);
00056 ulong pefindrva(struct _IMAGE_SECTION_HEADER *SectionHeader, int NumberOfSections, ulong TargetPhysical);
00057 int GetStrnlen(const char *string, int maxlen);
00058 
00059 #define ANSI_NAME_STRING(s) ((PANSI_STRING)((s)->Name))
00060 
00061 #endif/*_LIBMACH_PE_H_*/

Generated on Sun May 27 2012 04:36:20 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.