4
4
namespace PInvoke
5
5
{
6
6
using System ;
7
+ using System . Diagnostics ;
7
8
using System . Runtime . InteropServices ;
8
9
10
+ #pragma warning disable SA1623 // Property summary documentation must match accessors
11
+ #pragma warning disable SA1300 // Element must begin with upper-case letter
12
+ #pragma warning disable SA1202 // Elements must be ordered by access
13
+
9
14
/// <content>
10
15
/// Contains the <see cref="LOADED_IMAGE"/> nested type.
11
16
/// </content>
@@ -59,24 +64,14 @@ public unsafe partial struct LOADED_IMAGE
59
64
/// </summary>
60
65
public Characteristics Characteristics ;
61
66
62
- /// <summary>
63
- /// If the image is a kernel mode executable image, this value is TRUE.
64
- /// </summary>
65
- [ MarshalAs ( UnmanagedType . Bool ) ]
66
- public bool fSystemImage ;
67
+ [ DebuggerBrowsable ( DebuggerBrowsableState . Never ) ]
68
+ private byte fSystemImageByte ;
67
69
68
- /// <summary>
69
- /// If the image is a 16-bit executable image, this value is TRUE.
70
- /// </summary>
71
- [ MarshalAs ( UnmanagedType . Bool ) ]
72
- public bool fDOSImage ;
70
+ [ DebuggerBrowsable ( DebuggerBrowsableState . Never ) ]
71
+ private byte fDOSImageByte ;
73
72
74
- /// <summary>
75
- /// If the image is read-only, this value is TRUE.
76
- /// Prior to Windows Vista: This member is not included in the structure.
77
- /// </summary>
78
- [ MarshalAs ( UnmanagedType . Bool ) ]
79
- public bool fReadOnly ;
73
+ [ DebuggerBrowsable ( DebuggerBrowsableState . Never ) ]
74
+ private byte fReadOnlyByte ;
80
75
81
76
/// <summary>
82
77
/// The version string.
@@ -92,7 +87,35 @@ public unsafe partial struct LOADED_IMAGE
92
87
/// <summary>
93
88
/// The size of the image, in bytes.
94
89
/// </summary>
95
- public int SizeOfImage ;
90
+ public uint SizeOfImage ;
91
+
92
+ /// <summary>
93
+ /// If the image is a kernel mode executable image, this value is TRUE.
94
+ /// </summary>
95
+ public bool fSystemImage
96
+ {
97
+ get => this . fSystemImageByte != 0 ;
98
+ set => this . fSystemImageByte = value ? ( byte ) 1 : ( byte ) 0 ;
99
+ }
100
+
101
+ /// <summary>
102
+ /// If the image is a 16-bit executable image, this value is TRUE.
103
+ /// </summary>
104
+ public bool fDOSImage
105
+ {
106
+ get => this . fDOSImageByte != 0 ;
107
+ set => this . fDOSImageByte = value ? ( byte ) 1 : ( byte ) 0 ;
108
+ }
109
+
110
+ /// <summary>
111
+ /// If the image is read-only, this value is TRUE.
112
+ /// Prior to Windows Vista: This member is not included in the structure.
113
+ /// </summary>
114
+ public bool fReadOnly
115
+ {
116
+ get => this . fReadOnlyByte != 0 ;
117
+ set => this . fReadOnlyByte = value ? ( byte ) 1 : ( byte ) 0 ;
118
+ }
96
119
}
97
120
}
98
121
}
0 commit comments