GlennSlayden

struct declarations for https://stackoverflow.com/a/8711036/147511

Apr 9th, 2021 (edited)
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.08 KB | None | 0 0
  1. // referenced from https://stackoverflow.com/a/8711036/147511
  2.  
  3. // https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#machine-types
  4. // !! BEWARE: this enum is 'ushort' sized --
  5. //    do not replace it 'System.Reflection.ImageFileMachine' (which is 'int' sized) !!
  6. public enum ImageFileMachine : ushort
  7. {
  8.     Unknown         /**/ = 0x0000,
  9.     I386            /**/ = 0x014C,
  10.     WceMipsV2       /**/ = 0x0169,
  11.     Alpha           /**/ = 0x0184,
  12.     SH3             /**/ = 0x01A2,
  13.     SH3Dsp          /**/ = 0x01A3,
  14.     SH3E            /**/ = 0x01A4,
  15.     SH4             /**/ = 0x01A6,
  16.     SH5             /**/ = 0x01A8,
  17.     Arm             /**/ = 0x01C0,
  18.     Thumb           /**/ = 0x01C2,
  19.     ArmThumb2       /**/ = 0x01C4,
  20.     AM33            /**/ = 0x01D3,
  21.     PowerPC         /**/ = 0x01F0,
  22.     PowerPCFP       /**/ = 0x01F1,
  23.     IA64            /**/ = 0x0200,
  24.     MIPS16          /**/ = 0x0266,
  25.     Alpha64         /**/ = 0x0284,
  26.     MipsFpu         /**/ = 0x0366,
  27.     MipsFpu16       /**/ = 0x0466,
  28.     Tricore         /**/ = 0x0520,
  29.     Ebc             /**/ = 0x0EBC,
  30.     Amd64           /**/ = 0x8664,
  31.     M32R            /**/ = 0x9041,
  32. };
  33.  
  34. // https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#characteristics
  35. [Flags]
  36. public enum ImageFileCharacteristics : ushort
  37. {
  38.     RelocsStripped          /**/ = 0x0001,
  39.     ExecutableImage         /**/ = 0x0002,
  40.     LineNumsStripped        /**/ = 0x0004,
  41.     LocalSymsStripped       /**/ = 0x0008,
  42.     AggressiveWSTrim        /**/ = 0x0010,
  43.     LargeAddressAware       /**/ = 0x0020,
  44.     BytesReversedLo         /**/ = 0x0080,
  45.     Bit32Machine            /**/ = 0x0100,
  46.     DebugStripped           /**/ = 0x0200,
  47.     RemovableRunFromSwap    /**/ = 0x0400,
  48.     NetRunFromSwap          /**/ = 0x0800,
  49.     System                  /**/ = 0x1000,
  50.     Dll                     /**/ = 0x2000,
  51.     UpSystemOnly            /**/ = 0x4000,
  52.     BytesReversedHi         /**/ = 0x8000,
  53. };
  54.  
  55. // https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#windows-subsystem
  56. public enum Subsystem : ushort
  57. {
  58.     Unknown                 /**/ = 0x0000,
  59.     Native                  /**/ = 0x0001,
  60.     WindowsGui              /**/ = 0x0002,
  61.     WindowsCui              /**/ = 0x0003,
  62.     OS2Cui                  /**/ = 0x0005,
  63.     PosixCui                /**/ = 0x0007,
  64.     NativeWindows           /**/ = 0x0008,
  65.     WindowsCEGui            /**/ = 0x0009,
  66.     EfiApplication          /**/ = 0x000A,
  67.     EfiBootServiceDriver    /**/ = 0x000B,
  68.     EfiRuntimeDriver        /**/ = 0x000C,
  69.     EfiRom                  /**/ = 0x000D,
  70.     Xbox                    /**/ = 0x000E,
  71.     WindowsBootApplication  /**/ = 0x0010,
  72. };
  73.  
  74. // https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#dll-characteristics
  75. [Flags]
  76. public enum DllCharacteristics : ushort
  77. {
  78.     ProcessInit     /**/ = 0x0001,
  79.     ProcessTerm     /**/ = 0x0002,
  80.     ThreadInit      /**/ = 0x0004,
  81.     ThreadTerm      /**/ = 0x0008,
  82.     HighEntropyVA   /**/ = 0x0020,
  83.     DynamicBase     /**/ = 0x0040,
  84.     NxCompatible    /**/ = 0x0100,
  85.     NoIsolation     /**/ = 0x0200,
  86.     NoSeh           /**/ = 0x0400,
  87.     NoBind          /**/ = 0x0800,
  88.     AppContainer    /**/ = 0x1000,
  89.     WdmDriver       /**/ = 0x2000,
  90.     TSAware         /**/ = 0x8000,
  91. };
Add Comment
Please, Sign In to add comment