VirtualBox

Ignore:
Timestamp:
Sep 17, 2015 4:12:55 PM (9 years ago)
Author:
vboxsync
Message:

Reverted bad commit r102754.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/VBoxPeSetVersion.cpp

    r57808 r57809  
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #ifdef RT_OS_WINDOWS
    23 # include <Windows.h>
    24 #else
    25 # include <iprt/stdint.h>
    26 
    27 typedef struct _IMAGE_DOS_HEADER
    28 {
    29   uint16_t e_magic;
    30   uint16_t e_cblp;
    31   uint16_t e_cp;
    32   uint16_t e_crlc;
    33   uint16_t e_cparhdr;
    34   uint16_t e_minalloc;
    35   uint16_t e_maxalloc;
    36   uint16_t e_ss;
    37   uint16_t e_sp;
    38   uint16_t e_csum;
    39   uint16_t e_ip;
    40   uint16_t e_cs;
    41   uint16_t e_lfarlc;
    42   uint16_t e_ovno;
    43   uint16_t e_res[4];
    44   uint16_t e_oemid;
    45   uint16_t e_oeminfo;
    46   uint16_t e_res2[10];
    47   int32_t e_lfanew;
    48 } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
    49 
    50 typedef struct _IMAGE_FILE_HEADER
    51 {
    52     uint16_t Machine;
    53     uint16_t NumberOfSections;
    54     uint32_t TimeDateStamp;
    55     uint32_t PointerToSymbolTable;
    56     uint32_t NumberOfSymbols;
    57     uint16_t SizeOfOptionalHeader;
    58     uint16_t Characteristics;
    59 } IMAGE_FILE_HEADER,*PIMAGE_FILE_HEADER;
    60 
    61 typedef struct _IMAGE_DATA_DIRECTORY
    62 {
    63     uint32_t VirtualAddress;
    64     uint32_t Size;
    65 } IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY;
    66 
    67 # define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
    68 
    69 typedef struct _IMAGE_OPTIONAL_HEADER
    70 {
    71     uint16_t Magic;
    72     uint8_t MajorLinkerVersion;
    73     uint8_t MinorLinkerVersion;
    74     uint32_t SizeOfCode;
    75     uint32_t SizeOfInitializedData;
    76     uint32_t SizeOfUninitializedData;
    77     uint32_t AddressOfEntryPoint;
    78     uint32_t BaseOfCode;
    79     uint32_t BaseOfData;
    80     uint32_t ImageBase;
    81     uint32_t SectionAlignment;
    82     uint32_t FileAlignment;
    83     uint16_t MajorOperatingSystemVersion;
    84     uint16_t MinorOperatingSystemVersion;
    85     uint16_t MajorImageVersion;
    86     uint16_t MinorImageVersion;
    87     uint16_t MajorSubsystemVersion;
    88     uint16_t MinorSubsystemVersion;
    89     uint32_t Win32VersionValue;
    90     uint32_t SizeOfImage;
    91     uint32_t SizeOfHeaders;
    92     uint32_t CheckSum;
    93     uint16_t Subsystem;
    94     uint16_t DllCharacteristics;
    95     uint32_t SizeOfStackReserve;
    96     uint32_t SizeOfStackCommit;
    97     uint32_t SizeOfHeapReserve;
    98     uint32_t SizeOfHeapCommit;
    99     uint32_t LoaderFlags;
    100     uint32_t NumberOfRvaAndSizes;
    101     IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
    102 } IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32;
    103 
    104 typedef struct _IMAGE_NT_HEADERS
    105 {
    106     uint32_t Signature;
    107     IMAGE_FILE_HEADER FileHeader;
    108     IMAGE_OPTIONAL_HEADER32 OptionalHeader;
    109 } IMAGE_NT_HEADERS32,*PIMAGE_NT_HEADERS32;
    110 
    111 # define IMAGE_NT_SIGNATURE 0x00004550
    112 # define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
    113 # define IMAGE_FILE_MACHINE_I386 0x014c
    114 
    115 #endif
     22#include <Windows.h>
    11623#include <stdio.h>
    11724#include <string.h>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette