diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f83704d1..f6e90a76 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -196,8 +196,13 @@ anything else found in native header files for these reasons: | `WPARAM` | `IntPtr` | | `LRESULT` | `IntPtr` | +### Structs -### Struct field types +Tip: Avoid adding `[StructLayout(LayoutKind.Sequential)]` to your structs, +as [this is the default in C#](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.structlayoutattribute?view=netcore-3.1#remarks) and thus just more verbose than necessary. +You may need the attribute to add additional properties however, such as forcing a particular `Pack` property or `CharSet`. + +#### Field types When defining a struct, we should take care to make sure the struct is 'pinnable' (i.e. all fields must be value types rather than reference types.) Benefits of structs being pinnable include: diff --git a/src/AdvApi32/AdvApi32+ENUM_SERVICE_STATUS.cs b/src/AdvApi32/AdvApi32+ENUM_SERVICE_STATUS.cs index 4fb1f4af..0de76389 100644 --- a/src/AdvApi32/AdvApi32+ENUM_SERVICE_STATUS.cs +++ b/src/AdvApi32/AdvApi32+ENUM_SERVICE_STATUS.cs @@ -14,7 +14,6 @@ public partial class AdvApi32 /// Contains the name of a service in a service control manager database and information about that service. /// It is used by the EnumDependentServices and EnumServicesStatus functions. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct ENUM_SERVICE_STATUS { /// diff --git a/src/AdvApi32/AdvApi32+SC_ACTION.cs b/src/AdvApi32/AdvApi32+SC_ACTION.cs index 7c26f52f..68e12c4b 100644 --- a/src/AdvApi32/AdvApi32+SC_ACTION.cs +++ b/src/AdvApi32/AdvApi32+SC_ACTION.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Represents an action that the service control manager can perform. /// - [StructLayout(LayoutKind.Sequential)] public struct SC_ACTION { /// diff --git a/src/AdvApi32/AdvApi32+SERVICE_FAILURE_ACTIONS.cs b/src/AdvApi32/AdvApi32+SERVICE_FAILURE_ACTIONS.cs index f6be42a4..d9cb1e98 100644 --- a/src/AdvApi32/AdvApi32+SERVICE_FAILURE_ACTIONS.cs +++ b/src/AdvApi32/AdvApi32+SERVICE_FAILURE_ACTIONS.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Represents the action the service controller should take on each failure of a service. A service is considered failed when it terminates without reporting a status of SERVICE_STOPPED to the service controller. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct SERVICE_FAILURE_ACTIONS { diff --git a/src/AdvApi32/AdvApi32+SERVICE_STATUS.cs b/src/AdvApi32/AdvApi32+SERVICE_STATUS.cs index e743a482..27404a5e 100644 --- a/src/AdvApi32/AdvApi32+SERVICE_STATUS.cs +++ b/src/AdvApi32/AdvApi32+SERVICE_STATUS.cs @@ -15,7 +15,6 @@ public partial class AdvApi32 /// The ControlService, EnumDependentServices, EnumServicesStatus, and QueryServiceStatus functions use this structure. /// A service uses this structure in the function to report its current status to the service control manager. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct SERVICE_STATUS { /// diff --git a/src/AdvApi32/AdvApi32+SERVICE_STATUS_PROCESS.cs b/src/AdvApi32/AdvApi32+SERVICE_STATUS_PROCESS.cs index 56f5fe01..609dba50 100644 --- a/src/AdvApi32/AdvApi32+SERVICE_STATUS_PROCESS.cs +++ b/src/AdvApi32/AdvApi32+SERVICE_STATUS_PROCESS.cs @@ -15,7 +15,6 @@ public partial class AdvApi32 /// The ControlService, EnumDependentServices, EnumServicesStatus, and QueryServiceStatus functions use this structure. /// A service uses this structure in the function to report its current status to the service control manager. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct SERVICE_STATUS_PROCESS { /// diff --git a/src/AdvApi32/AdvApi32+SERVICE_TRIGGER_SPECIFIC_DATA_ITEM.cs b/src/AdvApi32/AdvApi32+SERVICE_TRIGGER_SPECIFIC_DATA_ITEM.cs index d36e2f0e..2090e7a4 100644 --- a/src/AdvApi32/AdvApi32+SERVICE_TRIGGER_SPECIFIC_DATA_ITEM.cs +++ b/src/AdvApi32/AdvApi32+SERVICE_TRIGGER_SPECIFIC_DATA_ITEM.cs @@ -15,7 +15,6 @@ public partial class AdvApi32 /// Contains trigger-specific data for a service trigger event. /// This structure is used by the structure for , , , or trigger events. /// - [StructLayout(LayoutKind.Sequential)] public struct SERVICE_TRIGGER_SPECIFIC_DATA_ITEM { /// diff --git a/src/AdvApi32/AdvApi32+ServiceDelayedAutoStartInfo.cs b/src/AdvApi32/AdvApi32+ServiceDelayedAutoStartInfo.cs index b5253878..e2668ba5 100644 --- a/src/AdvApi32/AdvApi32+ServiceDelayedAutoStartInfo.cs +++ b/src/AdvApi32/AdvApi32+ServiceDelayedAutoStartInfo.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Contains the delayed auto-start setting of an auto-start service. /// - [StructLayout(LayoutKind.Sequential)] public struct ServiceDelayedAutoStartInfo { /// diff --git a/src/AdvApi32/AdvApi32+ServiceDescription.cs b/src/AdvApi32/AdvApi32+ServiceDescription.cs index 8f53bb19..f83b49c7 100644 --- a/src/AdvApi32/AdvApi32+ServiceDescription.cs +++ b/src/AdvApi32/AdvApi32+ServiceDescription.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Contains a service description. /// - [StructLayout(LayoutKind.Sequential)] public struct ServiceDescription { /// diff --git a/src/AdvApi32/AdvApi32+ServiceLaunchProtectedInfo.cs b/src/AdvApi32/AdvApi32+ServiceLaunchProtectedInfo.cs index 0729c4e9..2a0780c7 100644 --- a/src/AdvApi32/AdvApi32+ServiceLaunchProtectedInfo.cs +++ b/src/AdvApi32/AdvApi32+ServiceLaunchProtectedInfo.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Indicates a service protection type. /// - [StructLayout(LayoutKind.Sequential)] public struct ServiceLaunchProtectedInfo { /// diff --git a/src/AdvApi32/AdvApi32+ServicePreferredNodeInfo.cs b/src/AdvApi32/AdvApi32+ServicePreferredNodeInfo.cs index 7b3995a7..bd3c92c4 100644 --- a/src/AdvApi32/AdvApi32+ServicePreferredNodeInfo.cs +++ b/src/AdvApi32/AdvApi32+ServicePreferredNodeInfo.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Represents the preferred node on which to run a service. /// - [StructLayout(LayoutKind.Sequential)] public struct ServicePreferredNodeInfo { /// diff --git a/src/AdvApi32/AdvApi32+ServicePreshutdownInfo.cs b/src/AdvApi32/AdvApi32+ServicePreshutdownInfo.cs index 3c359d82..4b455389 100644 --- a/src/AdvApi32/AdvApi32+ServicePreshutdownInfo.cs +++ b/src/AdvApi32/AdvApi32+ServicePreshutdownInfo.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Contains preshutdown settings /// - [StructLayout(LayoutKind.Sequential)] public struct ServicePreshutdownInfo { /// diff --git a/src/AdvApi32/AdvApi32+ServiceRequiredPrivilegesInfo.cs b/src/AdvApi32/AdvApi32+ServiceRequiredPrivilegesInfo.cs index cb57e813..87cbf2f3 100644 --- a/src/AdvApi32/AdvApi32+ServiceRequiredPrivilegesInfo.cs +++ b/src/AdvApi32/AdvApi32+ServiceRequiredPrivilegesInfo.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Represents the required privileges for a service. /// - [StructLayout(LayoutKind.Sequential)] public struct ServiceRequiredPrivilegesInfo { /// diff --git a/src/AdvApi32/AdvApi32+ServiceSidInfo.cs b/src/AdvApi32/AdvApi32+ServiceSidInfo.cs index a503f764..d4633fea 100644 --- a/src/AdvApi32/AdvApi32+ServiceSidInfo.cs +++ b/src/AdvApi32/AdvApi32+ServiceSidInfo.cs @@ -13,7 +13,6 @@ public static partial class AdvApi32 /// /// Represents a service security identifier (SID). /// - [StructLayout(LayoutKind.Sequential)] public struct ServiceSidInfo { /// diff --git a/src/AdvApi32/AdvApi32+ServiceTrigger.cs b/src/AdvApi32/AdvApi32+ServiceTrigger.cs index cd26a6d3..856a1943 100644 --- a/src/AdvApi32/AdvApi32+ServiceTrigger.cs +++ b/src/AdvApi32/AdvApi32+ServiceTrigger.cs @@ -14,7 +14,6 @@ public static partial class AdvApi32 /// /// Represents a service trigger event. This structure is used by the structure. /// - [StructLayout(LayoutKind.Sequential)] public struct ServiceTrigger { /// diff --git a/src/AdvApi32/AdvApi32+ServiceTriggerInfo.cs b/src/AdvApi32/AdvApi32+ServiceTriggerInfo.cs index 0065ffcf..a5c01363 100644 --- a/src/AdvApi32/AdvApi32+ServiceTriggerInfo.cs +++ b/src/AdvApi32/AdvApi32+ServiceTriggerInfo.cs @@ -14,7 +14,6 @@ public static partial class AdvApi32 /// /// Contains trigger event information for a service. This structure is used by the and QueryServiceConfig2 functions. /// - [StructLayout(LayoutKind.Sequential)] public struct ServiceTriggerInfo { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_ALGORITHM_IDENTIFIER.cs b/src/BCrypt/BCrypt+BCRYPT_ALGORITHM_IDENTIFIER.cs index 84f2db59..28de4f18 100644 --- a/src/BCrypt/BCrypt+BCRYPT_ALGORITHM_IDENTIFIER.cs +++ b/src/BCrypt/BCrypt+BCRYPT_ALGORITHM_IDENTIFIER.cs @@ -13,7 +13,6 @@ public partial class BCrypt /// /// Used with the function to contain a cryptographic algorithm identifier. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct BCRYPT_ALGORITHM_IDENTIFIER { diff --git a/src/BCrypt/BCrypt+BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO.cs b/src/BCrypt/BCrypt+BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO.cs index f3559623..c8827fdc 100644 --- a/src/BCrypt/BCrypt+BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO.cs +++ b/src/BCrypt/BCrypt+BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO.cs @@ -15,7 +15,6 @@ public partial class BCrypt /// Used with the and functions /// to contain additional information related to authenticated cipher modes. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO { diff --git a/src/BCrypt/BCrypt+BCRYPT_AUTH_TAG_LENGTHS_STRUCT.cs b/src/BCrypt/BCrypt+BCRYPT_AUTH_TAG_LENGTHS_STRUCT.cs index 8601e5a9..9a87a0dc 100644 --- a/src/BCrypt/BCrypt+BCRYPT_AUTH_TAG_LENGTHS_STRUCT.cs +++ b/src/BCrypt/BCrypt+BCRYPT_AUTH_TAG_LENGTHS_STRUCT.cs @@ -14,7 +14,6 @@ public partial class BCrypt /// /// defines the range of tag sizes that are supported by the provider. This structure is used with the property. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_AUTH_TAG_LENGTHS_STRUCT : IEnumerable { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_DH_KEY_BLOB.cs b/src/BCrypt/BCrypt+BCRYPT_DH_KEY_BLOB.cs index 09af7892..149e27a9 100644 --- a/src/BCrypt/BCrypt+BCRYPT_DH_KEY_BLOB.cs +++ b/src/BCrypt/BCrypt+BCRYPT_DH_KEY_BLOB.cs @@ -14,7 +14,6 @@ public partial class BCrypt /// A key blob format for transporting DH keys. /// Used as a header for a Diffie-Hellman public key or private key BLOB in memory. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_DH_KEY_BLOB { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB.cs b/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB.cs index 7f3688c1..0e6eca09 100644 --- a/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB.cs +++ b/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB.cs @@ -17,7 +17,6 @@ public partial class BCrypt /// /// The structure applies to DSA keys that equal or exceed 512 bits in length but are less than or equal to 1024 bits. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_DSA_KEY_BLOB { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB_V2.cs b/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB_V2.cs index 8068a2ed..9a039c04 100644 --- a/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB_V2.cs +++ b/src/BCrypt/BCrypt+BCRYPT_DSA_KEY_BLOB_V2.cs @@ -17,7 +17,6 @@ public partial class BCrypt /// /// The structure applies to DSA keys that exceed 1024 bits in length but are less than or equal to 3072 bits. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_DSA_KEY_BLOB_V2 { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_ECCKEY_BLOB.cs b/src/BCrypt/BCrypt+BCRYPT_ECCKEY_BLOB.cs index 6200bfe2..be64c1e1 100644 --- a/src/BCrypt/BCrypt+BCRYPT_ECCKEY_BLOB.cs +++ b/src/BCrypt/BCrypt+BCRYPT_ECCKEY_BLOB.cs @@ -14,7 +14,6 @@ public partial class BCrypt /// A key blob format for transporting ECC keys. /// Used as a header for an elliptic curve public key or private key BLOB in memory. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_ECCKEY_BLOB { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_KEY_BLOB.cs b/src/BCrypt/BCrypt+BCRYPT_KEY_BLOB.cs index 4ab6a7fe..11c174c7 100644 --- a/src/BCrypt/BCrypt+BCRYPT_KEY_BLOB.cs +++ b/src/BCrypt/BCrypt+BCRYPT_KEY_BLOB.cs @@ -14,7 +14,6 @@ public partial class BCrypt /// Represents a key blob header that identifies a key blob format for transporting keys. /// The base structure for all CNG key BLOBs. All CNG key BLOBs are based on this structure. For example, the structure is based on this structure. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_KEY_BLOB { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_KEY_DATA_BLOB_HEADER.cs b/src/BCrypt/BCrypt+BCRYPT_KEY_DATA_BLOB_HEADER.cs index d5d1ff9c..58160874 100644 --- a/src/BCrypt/BCrypt+BCRYPT_KEY_DATA_BLOB_HEADER.cs +++ b/src/BCrypt/BCrypt+BCRYPT_KEY_DATA_BLOB_HEADER.cs @@ -14,7 +14,6 @@ public partial class BCrypt /// /// Used to contain information about a key data BLOB. The key data BLOB must immediately follow this structure in memory. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_KEY_DATA_BLOB_HEADER { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_KEY_LENGTHS_STRUCT.cs b/src/BCrypt/BCrypt+BCRYPT_KEY_LENGTHS_STRUCT.cs index 7a98dd01..c0ab3e0d 100644 --- a/src/BCrypt/BCrypt+BCRYPT_KEY_LENGTHS_STRUCT.cs +++ b/src/BCrypt/BCrypt+BCRYPT_KEY_LENGTHS_STRUCT.cs @@ -15,7 +15,6 @@ public partial class BCrypt /// Defines the range of key sizes that are supported by the provider. /// This structure is used with the property. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_KEY_LENGTHS_STRUCT : IEnumerable { /// diff --git a/src/BCrypt/BCrypt+BCRYPT_OAEP_PADDING_INFO.cs b/src/BCrypt/BCrypt+BCRYPT_OAEP_PADDING_INFO.cs index 29140f95..937cd4e1 100644 --- a/src/BCrypt/BCrypt+BCRYPT_OAEP_PADDING_INFO.cs +++ b/src/BCrypt/BCrypt+BCRYPT_OAEP_PADDING_INFO.cs @@ -13,7 +13,6 @@ public partial class BCrypt /// /// The BCRYPT_OAEP_PADDING_INFO structure is used to provide options for the Optimal Asymmetric Encryption Padding (OAEP) scheme. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct BCRYPT_OAEP_PADDING_INFO { diff --git a/src/BCrypt/BCrypt+BCRYPT_PKCS1_PADDING_INFO.cs b/src/BCrypt/BCrypt+BCRYPT_PKCS1_PADDING_INFO.cs index b602e0c5..65a45378 100644 --- a/src/BCrypt/BCrypt+BCRYPT_PKCS1_PADDING_INFO.cs +++ b/src/BCrypt/BCrypt+BCRYPT_PKCS1_PADDING_INFO.cs @@ -13,7 +13,6 @@ public partial class BCrypt /// /// The BCRYPT_PKCS1_PADDING_INFO structure is used to provide options for the PKCS #1 padding scheme. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct BCRYPT_PKCS1_PADDING_INFO { diff --git a/src/BCrypt/BCrypt+BCRYPT_PSS_PADDING_INFO.cs b/src/BCrypt/BCrypt+BCRYPT_PSS_PADDING_INFO.cs index 92ba0f30..f17c87d9 100644 --- a/src/BCrypt/BCrypt+BCRYPT_PSS_PADDING_INFO.cs +++ b/src/BCrypt/BCrypt+BCRYPT_PSS_PADDING_INFO.cs @@ -13,7 +13,6 @@ public partial class BCrypt /// /// The BCRYPT_PSS_PADDING_INFO structure is used to provide options for the Probabilistic Signature Scheme (PSS) padding scheme. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct BCRYPT_PSS_PADDING_INFO { diff --git a/src/BCrypt/BCrypt+BCRYPT_RSAKEY_BLOB.cs b/src/BCrypt/BCrypt+BCRYPT_RSAKEY_BLOB.cs index ee420d03..37cd6792 100644 --- a/src/BCrypt/BCrypt+BCRYPT_RSAKEY_BLOB.cs +++ b/src/BCrypt/BCrypt+BCRYPT_RSAKEY_BLOB.cs @@ -13,7 +13,6 @@ public partial class BCrypt /// /// A key blob format for transporting RSA keys. /// - [StructLayout(LayoutKind.Sequential)] public struct BCRYPT_RSAKEY_BLOB { /// diff --git a/src/BCrypt/BCrypt+BCryptBuffer.cs b/src/BCrypt/BCrypt+BCryptBuffer.cs index 611f1a5f..4a2de05a 100644 --- a/src/BCrypt/BCrypt+BCryptBuffer.cs +++ b/src/BCrypt/BCrypt+BCryptBuffer.cs @@ -14,7 +14,6 @@ public static partial class BCrypt /// /// Used to represent a generic CNG buffer. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct BCryptBuffer { diff --git a/src/BCrypt/BCrypt+BCryptBufferDesc.cs b/src/BCrypt/BCrypt+BCryptBufferDesc.cs index d0fbd282..18267838 100644 --- a/src/BCrypt/BCrypt+BCryptBufferDesc.cs +++ b/src/BCrypt/BCrypt+BCryptBufferDesc.cs @@ -14,7 +14,6 @@ public static partial class BCrypt /// /// Used to contain a set of generic CNG buffers. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct BCryptBufferDesc { diff --git a/src/BCrypt/BCrypt+EccKeyBlob.cs b/src/BCrypt/BCrypt+EccKeyBlob.cs index 81ff7386..90bbaa78 100644 --- a/src/BCrypt/BCrypt+EccKeyBlob.cs +++ b/src/BCrypt/BCrypt+EccKeyBlob.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class BCrypt { - [StructLayout(LayoutKind.Sequential)] public struct EccKeyBlob { /// diff --git a/src/Crypt32/Crypt32+CRYPT_KEY_PROV_INFO.cs b/src/Crypt32/Crypt32+CRYPT_KEY_PROV_INFO.cs index 04b92be3..ec274058 100644 --- a/src/Crypt32/Crypt32+CRYPT_KEY_PROV_INFO.cs +++ b/src/Crypt32/Crypt32+CRYPT_KEY_PROV_INFO.cs @@ -14,7 +14,6 @@ public partial class Crypt32 /// /// The CRYPT_KEY_PROV_INFO structure contains information about a key container within a cryptographic service provider (CSP). /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct CRYPT_KEY_PROV_INFO { diff --git a/src/DbgHelp/DbgHelp+LOADED_IMAGE.cs b/src/DbgHelp/DbgHelp+LOADED_IMAGE.cs index 1c0ca5e6..56781279 100644 --- a/src/DbgHelp/DbgHelp+LOADED_IMAGE.cs +++ b/src/DbgHelp/DbgHelp+LOADED_IMAGE.cs @@ -19,7 +19,6 @@ public static partial class DbgHelp /// /// Contains information about the loaded image. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct LOADED_IMAGE { diff --git a/src/DwmApi/DwmApi+DWM_BLURBEHIND.cs b/src/DwmApi/DwmApi+DWM_BLURBEHIND.cs index 98c754a8..b33a29d2 100644 --- a/src/DwmApi/DwmApi+DWM_BLURBEHIND.cs +++ b/src/DwmApi/DwmApi+DWM_BLURBEHIND.cs @@ -14,7 +14,6 @@ public partial class DwmApi /// /// Specifies Desktop Window Manager (DWM) blur-behind properties. Used by the function. /// - [StructLayout(LayoutKind.Sequential)] public partial struct DWM_BLURBEHIND { /// diff --git a/src/Fusion/Fusion+FUSION_INSTALL_REFERENCE.cs b/src/Fusion/Fusion+FUSION_INSTALL_REFERENCE.cs index f045108e..fa476eb3 100644 --- a/src/Fusion/Fusion+FUSION_INSTALL_REFERENCE.cs +++ b/src/Fusion/Fusion+FUSION_INSTALL_REFERENCE.cs @@ -14,7 +14,6 @@ public partial class Fusion /// /// Represents a reference that an application makes to an assembly that the application has installed in the global assembly cache. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct FUSION_INSTALL_REFERENCE { diff --git a/src/Fusion/MSCorEE+ASSEMBLY_INFO.cs b/src/Fusion/MSCorEE+ASSEMBLY_INFO.cs index c09d8d53..5fe3b866 100644 --- a/src/Fusion/MSCorEE+ASSEMBLY_INFO.cs +++ b/src/Fusion/MSCorEE+ASSEMBLY_INFO.cs @@ -13,7 +13,6 @@ public partial class Fusion /// /// Contains information about an assembly that is registered in the global assembly cache. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct ASSEMBLY_INFO { diff --git a/src/Hid/Hid+HiddAttributes.cs b/src/Hid/Hid+HiddAttributes.cs index 8ecd9cf7..3d6d4d5f 100644 --- a/src/Hid/Hid+HiddAttributes.cs +++ b/src/Hid/Hid+HiddAttributes.cs @@ -13,7 +13,6 @@ public static partial class Hid /// /// The HIDD_ATTRIBUTES structure contains vendor information about a HIDClass device. /// - [StructLayout(LayoutKind.Sequential)] public struct HiddAttributes { /// diff --git a/src/Kernel32/Kernel32+FILETIME.cs b/src/Kernel32/Kernel32+FILETIME.cs index 29313776..280c32c1 100644 --- a/src/Kernel32/Kernel32+FILETIME.cs +++ b/src/Kernel32/Kernel32+FILETIME.cs @@ -20,7 +20,6 @@ public partial class Kernel32 /// Xamarin.Android and Xamarin.iOS omit the type and it causes link failures. /// See https://github.com/dotnet/pinvoke/issues/232 /// - [StructLayout(LayoutKind.Sequential)] public struct FILETIME { /// diff --git a/src/Kernel32/Kernel32+OSVERSIONINFOEX.cs b/src/Kernel32/Kernel32+OSVERSIONINFOEX.cs index b105ef81..0e634327 100644 --- a/src/Kernel32/Kernel32+OSVERSIONINFOEX.cs +++ b/src/Kernel32/Kernel32+OSVERSIONINFOEX.cs @@ -13,7 +13,6 @@ public static partial class Kernel32 /// /// The RTL_OSVERSIONINFOEXW structure contains operating system version information. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public unsafe partial struct OSVERSIONINFOEX { /// diff --git a/src/Kernel32/Kernel32+OVERLAPPED.cs b/src/Kernel32/Kernel32+OVERLAPPED.cs index c4c3c9ce..b7582e15 100644 --- a/src/Kernel32/Kernel32+OVERLAPPED.cs +++ b/src/Kernel32/Kernel32+OVERLAPPED.cs @@ -33,7 +33,6 @@ public partial class Kernel32 /// using the WaitForMultipleObjects function. /// /// - [StructLayout(LayoutKind.Sequential)] public struct OVERLAPPED { /// diff --git a/src/Kernel32/Kernel32+SECURITY_ATTRIBUTES.cs b/src/Kernel32/Kernel32+SECURITY_ATTRIBUTES.cs index 3295cbd4..69f8c4e1 100644 --- a/src/Kernel32/Kernel32+SECURITY_ATTRIBUTES.cs +++ b/src/Kernel32/Kernel32+SECURITY_ATTRIBUTES.cs @@ -16,7 +16,6 @@ public partial class Kernel32 /// /// The SECURITY_ATTRIBUTES structure contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable. This structure provides security settings for objects created by various functions, such as CreateFile, CreatePipe, CreateProcess, RegCreateKeyEx, or RegSaveKeyEx. /// - [StructLayout(LayoutKind.Sequential)] public struct SECURITY_ATTRIBUTES { /// diff --git a/src/Kernel32/Kernel32+SECURITY_DESCRIPTOR.cs b/src/Kernel32/Kernel32+SECURITY_DESCRIPTOR.cs index 0992e540..821f5588 100644 --- a/src/Kernel32/Kernel32+SECURITY_DESCRIPTOR.cs +++ b/src/Kernel32/Kernel32+SECURITY_DESCRIPTOR.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class Kernel32 { - [StructLayout(LayoutKind.Sequential)] public struct SECURITY_DESCRIPTOR { public byte Revision; diff --git a/src/Kernel32/Kernel32+SYSTEMTIME.cs b/src/Kernel32/Kernel32+SYSTEMTIME.cs index d772c5e4..245654dc 100644 --- a/src/Kernel32/Kernel32+SYSTEMTIME.cs +++ b/src/Kernel32/Kernel32+SYSTEMTIME.cs @@ -33,7 +33,6 @@ public partial class Kernel32 /// Because the system time can be adjusted either forward or backward, do not compare system time readings to determine elapsed time. /// Instead, use one of the methods described in Windows Time. /// - [StructLayout(LayoutKind.Sequential)] public struct SYSTEMTIME { /// diff --git a/src/Kernel32/Kernel32+WIN32_FIND_DATA.cs b/src/Kernel32/Kernel32+WIN32_FIND_DATA.cs index 74f8ded3..2c8ee2ba 100644 --- a/src/Kernel32/Kernel32+WIN32_FIND_DATA.cs +++ b/src/Kernel32/Kernel32+WIN32_FIND_DATA.cs @@ -10,7 +10,6 @@ namespace PInvoke /// public partial class Kernel32 { - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct WIN32_FIND_DATA { /// diff --git a/src/Kernel32/storebanned/Kernel32+ACL.cs b/src/Kernel32/storebanned/Kernel32+ACL.cs index 0a4a7d9a..b0378294 100644 --- a/src/Kernel32/storebanned/Kernel32+ACL.cs +++ b/src/Kernel32/storebanned/Kernel32+ACL.cs @@ -10,7 +10,6 @@ namespace PInvoke /// public partial class Kernel32 { - [StructLayout(LayoutKind.Sequential)] public struct ACL { public byte AclRevision; diff --git a/src/Kernel32/storebanned/Kernel32+CHAR_INFO.cs b/src/Kernel32/storebanned/Kernel32+CHAR_INFO.cs index 2aa0c2fb..dafd10d1 100644 --- a/src/Kernel32/storebanned/Kernel32+CHAR_INFO.cs +++ b/src/Kernel32/storebanned/Kernel32+CHAR_INFO.cs @@ -14,7 +14,6 @@ public partial class Kernel32 /// Specifies a Unicode or ANSI character and its attributes. /// This structure is used by console functions to read from and write to a console screen buffer. /// - [StructLayout(LayoutKind.Sequential)] public struct CHAR_INFO { /// diff --git a/src/Kernel32/storebanned/Kernel32+CONSOLE_SCREEN_BUFFER_INFO.cs b/src/Kernel32/storebanned/Kernel32+CONSOLE_SCREEN_BUFFER_INFO.cs index 02cd8d11..e84c78a1 100644 --- a/src/Kernel32/storebanned/Kernel32+CONSOLE_SCREEN_BUFFER_INFO.cs +++ b/src/Kernel32/storebanned/Kernel32+CONSOLE_SCREEN_BUFFER_INFO.cs @@ -13,7 +13,6 @@ public partial class Kernel32 /// /// Contains information about a console screen buffer. /// - [StructLayout(LayoutKind.Sequential)] public struct CONSOLE_SCREEN_BUFFER_INFO { /// diff --git a/src/Kernel32/storebanned/Kernel32+CONSOLE_SELECTION_INFO.cs b/src/Kernel32/storebanned/Kernel32+CONSOLE_SELECTION_INFO.cs index 22d1d7e4..88aa4f1c 100644 --- a/src/Kernel32/storebanned/Kernel32+CONSOLE_SELECTION_INFO.cs +++ b/src/Kernel32/storebanned/Kernel32+CONSOLE_SELECTION_INFO.cs @@ -13,7 +13,6 @@ public partial class Kernel32 /// /// Contains information for a console selection. /// - [StructLayout(LayoutKind.Sequential)] public struct CONSOLE_SELECTION_INFO { /// diff --git a/src/Kernel32/storebanned/Kernel32+FOCUS_EVENT_RECORD.cs b/src/Kernel32/storebanned/Kernel32+FOCUS_EVENT_RECORD.cs index 834c4769..1c6a4a43 100644 --- a/src/Kernel32/storebanned/Kernel32+FOCUS_EVENT_RECORD.cs +++ b/src/Kernel32/storebanned/Kernel32+FOCUS_EVENT_RECORD.cs @@ -17,7 +17,6 @@ public partial class Kernel32 /// /// These events are used internally and should be ignored. /// - [StructLayout(LayoutKind.Sequential)] public struct FOCUS_EVENT_RECORD { /// diff --git a/src/Kernel32/storebanned/Kernel32+INPUT_RECORD.cs b/src/Kernel32/storebanned/Kernel32+INPUT_RECORD.cs index 1921a537..f7c7c88a 100644 --- a/src/Kernel32/storebanned/Kernel32+INPUT_RECORD.cs +++ b/src/Kernel32/storebanned/Kernel32+INPUT_RECORD.cs @@ -16,7 +16,6 @@ public partial class Kernel32 /// These records can be read from the input buffer by using the or function, /// or written to the input buffer by using the function. /// - [StructLayout(LayoutKind.Sequential)] public struct INPUT_RECORD { /// diff --git a/src/Kernel32/storebanned/Kernel32+IO_COUNTERS.cs b/src/Kernel32/storebanned/Kernel32+IO_COUNTERS.cs index 298435b2..acee2afa 100644 --- a/src/Kernel32/storebanned/Kernel32+IO_COUNTERS.cs +++ b/src/Kernel32/storebanned/Kernel32+IO_COUNTERS.cs @@ -15,7 +15,6 @@ public partial class Kernel32 /// For a job object, the counters include all operations performed by all processes that have ever been associated with the job, /// in addition to all processes currently associated with the job. /// - [StructLayout(LayoutKind.Sequential)] public struct IO_COUNTERS { /// diff --git a/src/Kernel32/storebanned/Kernel32+JOBOBJECT_BASIC_LIMIT_INFORMATION.cs b/src/Kernel32/storebanned/Kernel32+JOBOBJECT_BASIC_LIMIT_INFORMATION.cs index 0fbfd6f5..54a46e56 100644 --- a/src/Kernel32/storebanned/Kernel32+JOBOBJECT_BASIC_LIMIT_INFORMATION.cs +++ b/src/Kernel32/storebanned/Kernel32+JOBOBJECT_BASIC_LIMIT_INFORMATION.cs @@ -14,7 +14,6 @@ public partial class Kernel32 /// /// Contains basic limit information for a job object. /// - [StructLayout(LayoutKind.Sequential)] public struct JOBOBJECT_BASIC_LIMIT_INFORMATION { /// diff --git a/src/Kernel32/storebanned/Kernel32+JOBOBJECT_EXTENDED_LIMIT_INFORMATION.cs b/src/Kernel32/storebanned/Kernel32+JOBOBJECT_EXTENDED_LIMIT_INFORMATION.cs index 7c08df13..9ad45bb5 100644 --- a/src/Kernel32/storebanned/Kernel32+JOBOBJECT_EXTENDED_LIMIT_INFORMATION.cs +++ b/src/Kernel32/storebanned/Kernel32+JOBOBJECT_EXTENDED_LIMIT_INFORMATION.cs @@ -19,7 +19,6 @@ public partial class Kernel32 /// Note that the job memory and process memory limits are very similar in operation, but they are independent. You could set a job-wide limit of 100 MB with a per-process limit of 10 MB. In this scenario, no single process could commit more than 10 MB, and the set of processes associated with a job could never exceed 100 MB. /// To register for notifications that a job has exceeded its peak memory limit while allowing processes to continue to commit memory, use the SetInformationJobObject function with the JobObjectNotificationLimitInformation information class. /// - [StructLayout(LayoutKind.Sequential)] public struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION { /// diff --git a/src/Kernel32/storebanned/Kernel32+KEY_EVENT_RECORD.cs b/src/Kernel32/storebanned/Kernel32+KEY_EVENT_RECORD.cs index acb107b4..2b02c0e1 100644 --- a/src/Kernel32/storebanned/Kernel32+KEY_EVENT_RECORD.cs +++ b/src/Kernel32/storebanned/Kernel32+KEY_EVENT_RECORD.cs @@ -14,7 +14,6 @@ public partial class Kernel32 /// /// Describes a keyboard input event in a console structure. /// - [StructLayout(LayoutKind.Sequential)] public struct KEY_EVENT_RECORD { /// diff --git a/src/Kernel32/storebanned/Kernel32+MENU_EVENT_RECORD.cs b/src/Kernel32/storebanned/Kernel32+MENU_EVENT_RECORD.cs index 4f372add..8a254b99 100644 --- a/src/Kernel32/storebanned/Kernel32+MENU_EVENT_RECORD.cs +++ b/src/Kernel32/storebanned/Kernel32+MENU_EVENT_RECORD.cs @@ -17,7 +17,6 @@ public partial class Kernel32 /// /// These events are used internally and should be ignored. /// - [StructLayout(LayoutKind.Sequential)] public struct MENU_EVENT_RECORD { /// diff --git a/src/Kernel32/storebanned/Kernel32+MODULEENTRY32.cs b/src/Kernel32/storebanned/Kernel32+MODULEENTRY32.cs index 02ca4fc0..07650255 100644 --- a/src/Kernel32/storebanned/Kernel32+MODULEENTRY32.cs +++ b/src/Kernel32/storebanned/Kernel32+MODULEENTRY32.cs @@ -17,7 +17,6 @@ public partial class Kernel32 /// /// Describes an entry from a list of the modules belonging to the specified process. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [SuppressMessage( "StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields must be private", diff --git a/src/Kernel32/storebanned/Kernel32+MOUSE_EVENT_RECORD.cs b/src/Kernel32/storebanned/Kernel32+MOUSE_EVENT_RECORD.cs index 4d488ad4..e342c8dd 100644 --- a/src/Kernel32/storebanned/Kernel32+MOUSE_EVENT_RECORD.cs +++ b/src/Kernel32/storebanned/Kernel32+MOUSE_EVENT_RECORD.cs @@ -14,7 +14,6 @@ public partial class Kernel32 /// /// Describes a mouse input event in a console structure. /// - [StructLayout(LayoutKind.Sequential)] public struct MOUSE_EVENT_RECORD { /// diff --git a/src/Kernel32/storebanned/Kernel32+PROCESSENTRY32.cs b/src/Kernel32/storebanned/Kernel32+PROCESSENTRY32.cs index 8a86124b..9631aeff 100644 --- a/src/Kernel32/storebanned/Kernel32+PROCESSENTRY32.cs +++ b/src/Kernel32/storebanned/Kernel32+PROCESSENTRY32.cs @@ -16,7 +16,6 @@ public partial class Kernel32 /// /// Describes an entry from a list of the processes residing in the system address space when a snapshot was taken. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [SuppressMessage( "StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields must be private", diff --git a/src/Kernel32/storebanned/Kernel32+PROCESS_INFORMATION.cs b/src/Kernel32/storebanned/Kernel32+PROCESS_INFORMATION.cs index 7866f65c..25eb334a 100644 --- a/src/Kernel32/storebanned/Kernel32+PROCESS_INFORMATION.cs +++ b/src/Kernel32/storebanned/Kernel32+PROCESS_INFORMATION.cs @@ -15,7 +15,6 @@ public partial class Kernel32 /// Contains information about a newly created process and its primary thread. It is used with the , /// , CreateProcessWithLogonW, or CreateProcessWithTokenW function. /// - [StructLayout(LayoutKind.Sequential)] public struct PROCESS_INFORMATION { /// diff --git a/src/Kernel32/storebanned/Kernel32+STARTUPINFOEX.cs b/src/Kernel32/storebanned/Kernel32+STARTUPINFOEX.cs index 77242836..d6eda452 100644 --- a/src/Kernel32/storebanned/Kernel32+STARTUPINFOEX.cs +++ b/src/Kernel32/storebanned/Kernel32+STARTUPINFOEX.cs @@ -14,7 +14,6 @@ public partial class Kernel32 /// /// Specifies the window station, desktop, standard handles, and attributes for a new process. It is used with the and functions. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct STARTUPINFOEX { diff --git a/src/Kernel32/storebanned/Kernel32+StartupInfo.cs b/src/Kernel32/storebanned/Kernel32+StartupInfo.cs index dc39d266..ffb414e4 100644 --- a/src/Kernel32/storebanned/Kernel32+StartupInfo.cs +++ b/src/Kernel32/storebanned/Kernel32+StartupInfo.cs @@ -16,7 +16,6 @@ public partial class Kernel32 /// /// Specifies the window station, desktop, standard handles, and appearance of the main window for a process at creation time. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct STARTUPINFO { diff --git a/src/Kernel32/storebanned/Kernel32+WINDOW_BUFFER_SIZE_RECORD.cs b/src/Kernel32/storebanned/Kernel32+WINDOW_BUFFER_SIZE_RECORD.cs index 5c5036be..4f193906 100644 --- a/src/Kernel32/storebanned/Kernel32+WINDOW_BUFFER_SIZE_RECORD.cs +++ b/src/Kernel32/storebanned/Kernel32+WINDOW_BUFFER_SIZE_RECORD.cs @@ -14,7 +14,6 @@ public partial class Kernel32 /// /// Describes a change in the size of the screen buffer in a console structure. /// - [StructLayout(LayoutKind.Sequential)] public struct WINDOW_BUFFER_SIZE_RECORD { /// diff --git a/src/Magnification/Magnification+MAGCOLOREFFECT.cs b/src/Magnification/Magnification+MAGCOLOREFFECT.cs index 2739a88b..1d7a64a9 100644 --- a/src/Magnification/Magnification+MAGCOLOREFFECT.cs +++ b/src/Magnification/Magnification+MAGCOLOREFFECT.cs @@ -14,7 +14,6 @@ public partial class Magnification /// /// Describes a color transformation matrix that a magnifier control uses to apply a color effect to magnified screen content. /// - [StructLayout(LayoutKind.Sequential)] public unsafe struct MAGCOLOREFFECT { /// diff --git a/src/Magnification/Magnification+MAGTRANSFORM.cs b/src/Magnification/Magnification+MAGTRANSFORM.cs index df8a35a3..3b1c7ef3 100644 --- a/src/Magnification/Magnification+MAGTRANSFORM.cs +++ b/src/Magnification/Magnification+MAGTRANSFORM.cs @@ -14,7 +14,6 @@ public partial class Magnification /// /// Describes a transformation matrix that a magnifier control uses to magnify screen content. /// - [StructLayout(LayoutKind.Sequential)] public unsafe struct MAGTRANSFORM { /// diff --git a/src/NCrypt/NCrypt+NCRYPT_KEY_BLOB_HEADER.cs b/src/NCrypt/NCrypt+NCRYPT_KEY_BLOB_HEADER.cs index 65485c2b..57b8c5b4 100644 --- a/src/NCrypt/NCrypt+NCRYPT_KEY_BLOB_HEADER.cs +++ b/src/NCrypt/NCrypt+NCRYPT_KEY_BLOB_HEADER.cs @@ -16,7 +16,6 @@ public partial class NCrypt /// /// Contains a key BLOB. This structure is used by the and functions. /// - [StructLayout(LayoutKind.Sequential)] public struct NCRYPT_KEY_BLOB_HEADER { /// diff --git a/src/NCrypt/NCrypt+NCRYPT_SUPPORTED_LENGTHS.cs b/src/NCrypt/NCrypt+NCRYPT_SUPPORTED_LENGTHS.cs index 0472cd03..9473b98e 100644 --- a/src/NCrypt/NCrypt+NCRYPT_SUPPORTED_LENGTHS.cs +++ b/src/NCrypt/NCrypt+NCRYPT_SUPPORTED_LENGTHS.cs @@ -14,7 +14,6 @@ public partial class NCrypt /// /// A structure is used with the property to contain length information for a key. /// - [StructLayout(LayoutKind.Sequential)] public struct NCRYPT_SUPPORTED_LENGTHS : IEnumerable { /// diff --git a/src/NCrypt/NCrypt+NCryptAlgorithmName.cs b/src/NCrypt/NCrypt+NCryptAlgorithmName.cs index 5ff02f63..4873569d 100644 --- a/src/NCrypt/NCrypt+NCryptAlgorithmName.cs +++ b/src/NCrypt/NCrypt+NCryptAlgorithmName.cs @@ -13,7 +13,6 @@ public partial class NCrypt /// /// The NCryptAlgorithmName structure is used to contain information about a CNG algorithm. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct NCryptAlgorithmName { diff --git a/src/NCrypt/NCrypt+NCryptBuffer.cs b/src/NCrypt/NCrypt+NCryptBuffer.cs index 170f4815..e5b7ea66 100644 --- a/src/NCrypt/NCrypt+NCryptBuffer.cs +++ b/src/NCrypt/NCrypt+NCryptBuffer.cs @@ -14,7 +14,6 @@ public partial class NCrypt /// /// The NCryptBuffer structure is used to identify a variable-length memory buffer. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct NCryptBuffer { diff --git a/src/NCrypt/NCrypt+NCryptBufferDesc.cs b/src/NCrypt/NCrypt+NCryptBufferDesc.cs index d12ab1c8..3fb89353 100644 --- a/src/NCrypt/NCrypt+NCryptBufferDesc.cs +++ b/src/NCrypt/NCrypt+NCryptBufferDesc.cs @@ -14,7 +14,6 @@ public partial class NCrypt /// /// Used to receive a collection of structures. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct NCryptBufferDesc { diff --git a/src/NCrypt/NCrypt+NCryptKeyName.cs b/src/NCrypt/NCrypt+NCryptKeyName.cs index 16945987..f109ae92 100644 --- a/src/NCrypt/NCrypt+NCryptKeyName.cs +++ b/src/NCrypt/NCrypt+NCryptKeyName.cs @@ -14,7 +14,6 @@ public partial class NCrypt /// /// Contains information about a CNG key. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct NCryptKeyName { diff --git a/src/NCrypt/storebanned/NCrypt+NCryptProviderName.cs b/src/NCrypt/storebanned/NCrypt+NCryptProviderName.cs index 74eeec0a..cbe36d4b 100644 --- a/src/NCrypt/storebanned/NCrypt+NCryptProviderName.cs +++ b/src/NCrypt/storebanned/NCrypt+NCryptProviderName.cs @@ -13,7 +13,6 @@ public partial class NCrypt /// /// Contains the name of a CNG key storage provider. This structure is used with the function to return the names of the registered CNG key storage providers. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct NCryptProviderName { diff --git a/src/NTDll/NTDll+OBJECT_ATTRIBUTES.cs b/src/NTDll/NTDll+OBJECT_ATTRIBUTES.cs index 5364b582..6b0e65b8 100644 --- a/src/NTDll/NTDll+OBJECT_ATTRIBUTES.cs +++ b/src/NTDll/NTDll+OBJECT_ATTRIBUTES.cs @@ -14,7 +14,6 @@ public static partial class NTDll /// /// The OBJECT_ATTRIBUTES structure specifies attributes that can be applied to objects or object handles by routines that create objects and/or return handles to objects. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct OBJECT_ATTRIBUTES { diff --git a/src/NTDll/NTDll+UNICODE_STRING.cs b/src/NTDll/NTDll+UNICODE_STRING.cs index ea1e5066..7b13a7fa 100644 --- a/src/NTDll/NTDll+UNICODE_STRING.cs +++ b/src/NTDll/NTDll+UNICODE_STRING.cs @@ -16,7 +16,6 @@ public static partial class NTDll /// /// The UNICODE_STRING structure is used to define Unicode strings. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct UNICODE_STRING { diff --git a/src/NetApi32/NetApi32+USER_INFO_0.cs b/src/NetApi32/NetApi32+USER_INFO_0.cs index 589b9a21..9cc60427 100644 --- a/src/NetApi32/NetApi32+USER_INFO_0.cs +++ b/src/NetApi32/NetApi32+USER_INFO_0.cs @@ -14,7 +14,6 @@ public partial class NetApi32 /// The USER_INFO_0 structure contains a user account name. /// [OfferIntPtrPropertyAccessors] - [StructLayout(LayoutKind.Sequential)] public unsafe partial struct USER_INFO_0 { /// diff --git a/src/NetApi32/NetApi32+USER_INFO_1.cs b/src/NetApi32/NetApi32+USER_INFO_1.cs index 912d0629..bc0785b0 100644 --- a/src/NetApi32/NetApi32+USER_INFO_1.cs +++ b/src/NetApi32/NetApi32+USER_INFO_1.cs @@ -15,7 +15,6 @@ public partial class NetApi32 /// The USER_INFO_1 structure contains information about a user account, including account name, password data, privilege level, and the path to the user's home directory. /// [OfferIntPtrPropertyAccessors] - [StructLayout(LayoutKind.Sequential)] public unsafe partial struct USER_INFO_1 { /// diff --git a/src/Psapi/Psapi+MODULEINFO.cs b/src/Psapi/Psapi+MODULEINFO.cs index 3bacee8f..3f98fda5 100644 --- a/src/Psapi/Psapi+MODULEINFO.cs +++ b/src/Psapi/Psapi+MODULEINFO.cs @@ -13,7 +13,6 @@ public static partial class Psapi /// /// The MODULEINFO structure specifies processmodules properties. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct MODULEINFO { diff --git a/src/SetupApi/SetupApi+SP_DEVICE_INTERFACE_DETAIL_DATA.cs b/src/SetupApi/SetupApi+SP_DEVICE_INTERFACE_DETAIL_DATA.cs index c484092b..928b9f94 100644 --- a/src/SetupApi/SetupApi+SP_DEVICE_INTERFACE_DETAIL_DATA.cs +++ b/src/SetupApi/SetupApi+SP_DEVICE_INTERFACE_DETAIL_DATA.cs @@ -14,7 +14,6 @@ public partial class SetupApi /// /// An SP_DEVICE_INTERFACE_DETAIL_DATA structure contains the path for a device interface. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public unsafe struct SP_DEVICE_INTERFACE_DETAIL_DATA { /// diff --git a/src/Shell32/storebanned/Shell32+ITEMIDLIST.cs b/src/Shell32/storebanned/Shell32+ITEMIDLIST.cs index 0b7d538f..41d3b9d8 100644 --- a/src/Shell32/storebanned/Shell32+ITEMIDLIST.cs +++ b/src/Shell32/storebanned/Shell32+ITEMIDLIST.cs @@ -16,7 +16,6 @@ public partial class Shell32 /// rather than copied around because it is just the header to a native buffer. /// /// Used by and - [StructLayout(LayoutKind.Sequential)] public struct ITEMIDLIST { /// diff --git a/src/Shell32/storebanned/Shell32+SHITEMID.cs b/src/Shell32/storebanned/Shell32+SHITEMID.cs index 13a7f83e..40ee4aff 100644 --- a/src/Shell32/storebanned/Shell32+SHITEMID.cs +++ b/src/Shell32/storebanned/Shell32+SHITEMID.cs @@ -17,7 +17,6 @@ public partial class Shell32 /// rather than copied around because it is just the header to a native buffer. /// /// Used by - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct SHITEMID { diff --git a/src/User32/USer32+HELPINFO.cs b/src/User32/USer32+HELPINFO.cs index 2f688f42..f4d2fa5f 100644 --- a/src/User32/USer32+HELPINFO.cs +++ b/src/User32/USer32+HELPINFO.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct HELPINFO { public int cbSize; diff --git a/src/User32/User32+CURSORINFO.cs b/src/User32/User32+CURSORINFO.cs index c901e53d..a31aa1e2 100644 --- a/src/User32/User32+CURSORINFO.cs +++ b/src/User32/User32+CURSORINFO.cs @@ -14,7 +14,6 @@ public static partial class User32 /// /// Contains global cursor information. /// - [StructLayout(LayoutKind.Sequential)] public struct CURSORINFO { /// diff --git a/src/User32/User32+DISPLAYCONFIG_2dREGION.cs b/src/User32/User32+DISPLAYCONFIG_2dREGION.cs index d2acb0df..f8580865 100644 --- a/src/User32/User32+DISPLAYCONFIG_2dREGION.cs +++ b/src/User32/User32+DISPLAYCONFIG_2dREGION.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_2DREGION { public uint cx; diff --git a/src/User32/User32+DISPLAYCONFIG_ADDITIONAL_SIGNAL_INFO.cs b/src/User32/User32+DISPLAYCONFIG_ADDITIONAL_SIGNAL_INFO.cs index 302220d4..053a8186 100644 --- a/src/User32/User32+DISPLAYCONFIG_ADDITIONAL_SIGNAL_INFO.cs +++ b/src/User32/User32+DISPLAYCONFIG_ADDITIONAL_SIGNAL_INFO.cs @@ -16,7 +16,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_ADDITIONAL_SIGNAL_INFO { private const int vSyncFreqDividerBitMask = 0x3f; diff --git a/src/User32/User32+DISPLAYCONFIG_DESKTOP_IMAGE_INFO.cs b/src/User32/User32+DISPLAYCONFIG_DESKTOP_IMAGE_INFO.cs index e3e51f84..67563828 100644 --- a/src/User32/User32+DISPLAYCONFIG_DESKTOP_IMAGE_INFO.cs +++ b/src/User32/User32+DISPLAYCONFIG_DESKTOP_IMAGE_INFO.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_DESKTOP_IMAGE_INFO { public POINT PathSourceSize; diff --git a/src/User32/User32+DISPLAYCONFIG_PATH_INFO.cs b/src/User32/User32+DISPLAYCONFIG_PATH_INFO.cs index 0ea804b1..e8a1315b 100644 --- a/src/User32/User32+DISPLAYCONFIG_PATH_INFO.cs +++ b/src/User32/User32+DISPLAYCONFIG_PATH_INFO.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_PATH_INFO { public DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo; diff --git a/src/User32/User32+DISPLAYCONFIG_PATH_TARGET_INFO.cs b/src/User32/User32+DISPLAYCONFIG_PATH_TARGET_INFO.cs index 3b2d1583..95f9f98f 100644 --- a/src/User32/User32+DISPLAYCONFIG_PATH_TARGET_INFO.cs +++ b/src/User32/User32+DISPLAYCONFIG_PATH_TARGET_INFO.cs @@ -22,7 +22,6 @@ public enum DISPLAYCONFIG_PATH_TARGET_INFOFlags DISPLAYCONFIG_TARGET_FORCED_AVAILABILITY_SYSTEM = 0x00000010, } - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_PATH_TARGET_INFO { public LUID adapterId; diff --git a/src/User32/User32+DISPLAYCONFIG_RATIONAL.cs b/src/User32/User32+DISPLAYCONFIG_RATIONAL.cs index b658314f..bcb17709 100644 --- a/src/User32/User32+DISPLAYCONFIG_RATIONAL.cs +++ b/src/User32/User32+DISPLAYCONFIG_RATIONAL.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_RATIONAL { public uint Numerator; diff --git a/src/User32/User32+DISPLAYCONFIG_SOURCE_MODE.cs b/src/User32/User32+DISPLAYCONFIG_SOURCE_MODE.cs index 08d9b88d..d43c1c4c 100644 --- a/src/User32/User32+DISPLAYCONFIG_SOURCE_MODE.cs +++ b/src/User32/User32+DISPLAYCONFIG_SOURCE_MODE.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_SOURCE_MODE { public uint width; diff --git a/src/User32/User32+DISPLAYCONFIG_TARGET_MODE.cs b/src/User32/User32+DISPLAYCONFIG_TARGET_MODE.cs index cd782f8d..366a2490 100644 --- a/src/User32/User32+DISPLAYCONFIG_TARGET_MODE.cs +++ b/src/User32/User32+DISPLAYCONFIG_TARGET_MODE.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_TARGET_MODE { public DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo; diff --git a/src/User32/User32+DISPLAYCONFIG__TARGET_MODE_INFO.cs b/src/User32/User32+DISPLAYCONFIG__TARGET_MODE_INFO.cs index 6a3d21c9..4241b7ab 100644 --- a/src/User32/User32+DISPLAYCONFIG__TARGET_MODE_INFO.cs +++ b/src/User32/User32+DISPLAYCONFIG__TARGET_MODE_INFO.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_TARGET_MODE_INFO { private uint bitvector; diff --git a/src/User32/User32+DRAWTEXTPARAMS.cs b/src/User32/User32+DRAWTEXTPARAMS.cs index 9aa92563..592a72f9 100644 --- a/src/User32/User32+DRAWTEXTPARAMS.cs +++ b/src/User32/User32+DRAWTEXTPARAMS.cs @@ -14,7 +14,6 @@ public partial class User32 /// /// Values to pass to the method describing extended formatting options for the text. /// - [StructLayout(LayoutKind.Sequential)] public struct DRAWTEXTPARAMS { /// diff --git a/src/User32/User32+FLASHWINFO.cs b/src/User32/User32+FLASHWINFO.cs index 87fb69f2..561e6d78 100644 --- a/src/User32/User32+FLASHWINFO.cs +++ b/src/User32/User32+FLASHWINFO.cs @@ -13,7 +13,6 @@ public partial class User32 /// Contains the flash status for a window and the number of times the system should flash the window. Used in /// . /// - [StructLayout(LayoutKind.Sequential)] public struct FLASHWINFO { /// The size of the structure, in bytes. diff --git a/src/User32/User32+HARDWAREINPUT.cs b/src/User32/User32+HARDWAREINPUT.cs index a27ef6d6..d1dd3748 100644 --- a/src/User32/User32+HARDWAREINPUT.cs +++ b/src/User32/User32+HARDWAREINPUT.cs @@ -14,7 +14,6 @@ public partial class User32 /// /// Contains information about a simulated message generated by an input device other than a keyboard or mouse. /// - [StructLayout(LayoutKind.Sequential)] public struct HARDWAREINPUT { /// diff --git a/src/User32/User32+INPUT.cs b/src/User32/User32+INPUT.cs index 25e6b5f9..1d1d27a7 100644 --- a/src/User32/User32+INPUT.cs +++ b/src/User32/User32+INPUT.cs @@ -15,7 +15,6 @@ public partial class User32 /// /// Used by to store information for synthesizing input events such as keystrokes, mouse movement, and mouse clicks. /// - [StructLayout(LayoutKind.Sequential)] public struct INPUT { /// diff --git a/src/User32/User32+KEYBDINPUT.cs b/src/User32/User32+KEYBDINPUT.cs index 9d3c5de6..ab87b241 100644 --- a/src/User32/User32+KEYBDINPUT.cs +++ b/src/User32/User32+KEYBDINPUT.cs @@ -14,7 +14,6 @@ public partial class User32 /// /// Contains information about a simulated keyboard event. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct KEYBDINPUT { diff --git a/src/User32/User32+LUID.cs b/src/User32/User32+LUID.cs index 311ed486..921453f6 100644 --- a/src/User32/User32+LUID.cs +++ b/src/User32/User32+LUID.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct LUID { public uint LowPart; diff --git a/src/User32/User32+MENUINFO.cs b/src/User32/User32+MENUINFO.cs index e3bd20c9..d2fff772 100644 --- a/src/User32/User32+MENUINFO.cs +++ b/src/User32/User32+MENUINFO.cs @@ -14,11 +14,6 @@ public partial class User32 /// /// Contains information about a menu. /// -#if NETPORTABLE - [StructLayout(LayoutKind.Sequential)] -#else - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] -#endif public struct MENUINFO { /// The size of the structure, in bytes. diff --git a/src/User32/User32+MENUITEMINFO.cs b/src/User32/User32+MENUITEMINFO.cs index 75484c28..67937a1b 100644 --- a/src/User32/User32+MENUITEMINFO.cs +++ b/src/User32/User32+MENUITEMINFO.cs @@ -14,11 +14,6 @@ public partial class User32 /// /// Contains information about a menu item. /// -#if NETPORTABLE - [StructLayout(LayoutKind.Sequential)] -#else - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] -#endif [OfferIntPtrPropertyAccessors] public unsafe partial struct MENUITEMINFO { diff --git a/src/User32/User32+MONITORINFO.cs b/src/User32/User32+MONITORINFO.cs index fa9c34ce..3159f410 100644 --- a/src/User32/User32+MONITORINFO.cs +++ b/src/User32/User32+MONITORINFO.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct MONITORINFO { public int cbSize; diff --git a/src/User32/User32+MONITORINFOEX.cs b/src/User32/User32+MONITORINFOEX.cs index dc381563..7521412f 100644 --- a/src/User32/User32+MONITORINFOEX.cs +++ b/src/User32/User32+MONITORINFOEX.cs @@ -17,11 +17,6 @@ public partial class User32 /// MONITORINFOEX structure is a superset of the MONITORINFO structure. The MONITORINFOEX /// structure adds a string member to contain a name for the display monitor. /// -#if NETPORTABLE - [StructLayout(LayoutKind.Sequential)] -#else - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] -#endif public unsafe struct MONITORINFOEX { /// diff --git a/src/User32/User32+MOUSEINPUT.cs b/src/User32/User32+MOUSEINPUT.cs index f3b85305..d59f0db0 100644 --- a/src/User32/User32+MOUSEINPUT.cs +++ b/src/User32/User32+MOUSEINPUT.cs @@ -14,7 +14,6 @@ public partial class User32 /// /// Contains information about a simulated mouse event. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct MOUSEINPUT { diff --git a/src/User32/User32+MSG.cs b/src/User32/User32+MSG.cs index c1f77b5e..e8a6b4ef 100644 --- a/src/User32/User32+MSG.cs +++ b/src/User32/User32+MSG.cs @@ -14,7 +14,6 @@ public partial class User32 /// /// Contains message information from a thread's message queue. /// - [StructLayout(LayoutKind.Sequential)] public struct MSG { /// diff --git a/src/User32/User32+MSGBOXPARAMS.cs b/src/User32/User32+MSGBOXPARAMS.cs index d1cbf545..54f62fe5 100644 --- a/src/User32/User32+MSGBOXPARAMS.cs +++ b/src/User32/User32+MSGBOXPARAMS.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public unsafe struct MSGBOXPARAMS { public int cbSize; diff --git a/src/User32/User32+PAINTSTRUCT.cs b/src/User32/User32+PAINTSTRUCT.cs index 19e9f977..f8d13baf 100644 --- a/src/User32/User32+PAINTSTRUCT.cs +++ b/src/User32/User32+PAINTSTRUCT.cs @@ -14,7 +14,6 @@ public partial class User32 /// /// Contains information for an application. This information can be used to paint the client area of a window owned by that application. /// - [StructLayout(LayoutKind.Sequential)] public unsafe struct PAINTSTRUCT { /// diff --git a/src/User32/User32+USEROBJECTFLAGS.cs b/src/User32/User32+USEROBJECTFLAGS.cs index 0e6c5a5d..88000b68 100644 --- a/src/User32/User32+USEROBJECTFLAGS.cs +++ b/src/User32/User32+USEROBJECTFLAGS.cs @@ -13,7 +13,6 @@ public partial class User32 /// /// Contains information about a window station or desktop handle. /// - [StructLayout(LayoutKind.Sequential)] public struct USEROBJECTFLAGS { /// diff --git a/src/User32/User32+WINDOWINFO.cs b/src/User32/User32+WINDOWINFO.cs index d28b34cb..d4bea079 100644 --- a/src/User32/User32+WINDOWINFO.cs +++ b/src/User32/User32+WINDOWINFO.cs @@ -10,7 +10,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct WINDOWINFO { public uint cbSize; diff --git a/src/User32/User32+WINDOWPLACEMENT.cs b/src/User32/User32+WINDOWPLACEMENT.cs index 768877fc..688110c8 100644 --- a/src/User32/User32+WINDOWPLACEMENT.cs +++ b/src/User32/User32+WINDOWPLACEMENT.cs @@ -13,7 +13,6 @@ public partial class User32 /// /// Contains information about the placement of a window on the screen. /// - [StructLayout(LayoutKind.Sequential)] public struct WINDOWPLACEMENT { /// diff --git a/src/User32/User32+WINMAXINFO.cs b/src/User32/User32+WINMAXINFO.cs index 338c58bc..5abba160 100644 --- a/src/User32/User32+WINMAXINFO.cs +++ b/src/User32/User32+WINMAXINFO.cs @@ -10,7 +10,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential)] public struct MINMAXINFO { public POINT ptReserved; diff --git a/src/User32/User32+WNDCLASS.cs b/src/User32/User32+WNDCLASS.cs index 7a8d41af..37ce4b15 100644 --- a/src/User32/User32+WNDCLASS.cs +++ b/src/User32/User32+WNDCLASS.cs @@ -11,7 +11,6 @@ namespace PInvoke /// public partial class User32 { - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public unsafe struct WNDCLASS { public ClassStyles style; diff --git a/src/User32/User32+WNDCLASSEX.cs b/src/User32/User32+WNDCLASSEX.cs index 923e76c3..7c3a4409 100644 --- a/src/User32/User32+WNDCLASSEX.cs +++ b/src/User32/User32+WNDCLASSEX.cs @@ -15,7 +15,6 @@ public partial class User32 /// Contains window class information. It is used with the and functions. /// The structure is similar to the structure. There are two differences. includes the member, which specifies the size of the structure, and the member, which contains a handle to a small icon associated with the window class. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct WNDCLASSEX { diff --git a/src/UxTheme/UxTheme+MARGINS.cs b/src/UxTheme/UxTheme+MARGINS.cs index 72329c57..83d3066d 100644 --- a/src/UxTheme/UxTheme+MARGINS.cs +++ b/src/UxTheme/UxTheme+MARGINS.cs @@ -14,7 +14,6 @@ public partial class UxTheme /// /// Returned by the function to define the margins of windows that have visual styles applied. /// - [StructLayout(LayoutKind.Sequential)] public struct MARGINS { /// diff --git a/src/Windows.Core/COORD.cs b/src/Windows.Core/COORD.cs index 9bc9da75..8ed2c701 100644 --- a/src/Windows.Core/COORD.cs +++ b/src/Windows.Core/COORD.cs @@ -8,7 +8,6 @@ namespace PInvoke /// /// The COORD structure defines the X- and Y- coordinates of a point. /// - [StructLayout(LayoutKind.Sequential)] public struct COORD { /// diff --git a/src/Windows.Core/HResult.cs b/src/Windows.Core/HResult.cs index 66813c89..d284e3c3 100644 --- a/src/Windows.Core/HResult.cs +++ b/src/Windows.Core/HResult.cs @@ -45,7 +45,6 @@ namespace PInvoke /// /// [DebuggerDisplay("{Value}")] - [StructLayout(LayoutKind.Sequential)] public partial struct HResult : IComparable, IComparable, IEquatable, IFormattable { /// diff --git a/src/Windows.Core/IMAGE_NT_HEADERS.cs b/src/Windows.Core/IMAGE_NT_HEADERS.cs index d0e065bd..b4b308d8 100644 --- a/src/Windows.Core/IMAGE_NT_HEADERS.cs +++ b/src/Windows.Core/IMAGE_NT_HEADERS.cs @@ -8,7 +8,6 @@ namespace PInvoke /// /// Represents the PE header format. /// - [StructLayout(LayoutKind.Sequential)] public struct IMAGE_NT_HEADERS { /// diff --git a/src/Windows.Core/IMAGE_OPTIONAL_HEADER.cs b/src/Windows.Core/IMAGE_OPTIONAL_HEADER.cs index d93ea470..d4d23048 100644 --- a/src/Windows.Core/IMAGE_OPTIONAL_HEADER.cs +++ b/src/Windows.Core/IMAGE_OPTIONAL_HEADER.cs @@ -17,7 +17,6 @@ namespace PInvoke /// /// The number of directories is not fixed. Check the NumberOfRvaAndSizes member before looking for a specific directory. /// - [StructLayout(LayoutKind.Sequential)] public unsafe partial struct IMAGE_OPTIONAL_HEADER { /// diff --git a/src/Windows.Core/IMAGE_OPTIONAL_HEADER_DIRECTORIES.cs b/src/Windows.Core/IMAGE_OPTIONAL_HEADER_DIRECTORIES.cs index ebd87a2e..a645738e 100644 --- a/src/Windows.Core/IMAGE_OPTIONAL_HEADER_DIRECTORIES.cs +++ b/src/Windows.Core/IMAGE_OPTIONAL_HEADER_DIRECTORIES.cs @@ -10,7 +10,6 @@ namespace PInvoke /// Describes a fixed array of 16 structures, /// where the array is *not* allocated on the heap. /// - [StructLayout(LayoutKind.Sequential)] public struct IMAGE_OPTIONAL_HEADER_DIRECTORIES { public IMAGE_DATA_DIRECTORY ExportTable; diff --git a/src/Windows.Core/IMAGE_SECTION_HEADER.cs b/src/Windows.Core/IMAGE_SECTION_HEADER.cs index 5f3e4906..8282e54e 100644 --- a/src/Windows.Core/IMAGE_SECTION_HEADER.cs +++ b/src/Windows.Core/IMAGE_SECTION_HEADER.cs @@ -8,7 +8,6 @@ namespace PInvoke /// /// Represents the image section header format. /// - [StructLayout(LayoutKind.Sequential)] public unsafe partial struct IMAGE_SECTION_HEADER { /// diff --git a/src/Windows.Core/LIST_ENTRY.cs b/src/Windows.Core/LIST_ENTRY.cs index 18a7cd6b..4a04163d 100644 --- a/src/Windows.Core/LIST_ENTRY.cs +++ b/src/Windows.Core/LIST_ENTRY.cs @@ -8,7 +8,6 @@ namespace PInvoke /// /// Describes a link in a doubly-linked list. /// - [StructLayout(LayoutKind.Sequential)] [OfferIntPtrPropertyAccessors] public unsafe partial struct LIST_ENTRY { diff --git a/src/Windows.Core/NTStatus.cs b/src/Windows.Core/NTStatus.cs index 86d68ec1..308c7c3a 100644 --- a/src/Windows.Core/NTStatus.cs +++ b/src/Windows.Core/NTStatus.cs @@ -33,7 +33,6 @@ namespace PInvoke /// The success status codes 0 - 63 are reserved for wait completion status. /// [DebuggerDisplay("{Value}")] - [StructLayout(LayoutKind.Sequential)] public partial struct NTSTATUS : IComparable, IComparable, IEquatable, IFormattable { /// diff --git a/src/Windows.Core/POINT.cs b/src/Windows.Core/POINT.cs index 518caff4..7ee3173a 100644 --- a/src/Windows.Core/POINT.cs +++ b/src/Windows.Core/POINT.cs @@ -8,7 +8,6 @@ namespace PInvoke /// /// The POINT structure defines the x- and y- coordinates of a point. /// - [StructLayout(LayoutKind.Sequential)] public struct POINT { /// diff --git a/src/Windows.Core/RECT.cs b/src/Windows.Core/RECT.cs index 72e6d660..f16f078b 100644 --- a/src/Windows.Core/RECT.cs +++ b/src/Windows.Core/RECT.cs @@ -14,7 +14,6 @@ namespace PInvoke /// For example, when RECT is passed to the FillRect function, the rectangle is filled up to, but not including, /// the right column and bottom row of pixels. This structure is identical to the RECTL structure. /// - [StructLayout(LayoutKind.Sequential)] public struct RECT { /// diff --git a/src/Windows.Core/SMALL_RECT.cs b/src/Windows.Core/SMALL_RECT.cs index 3a7d5e12..76a9568f 100644 --- a/src/Windows.Core/SMALL_RECT.cs +++ b/src/Windows.Core/SMALL_RECT.cs @@ -12,7 +12,6 @@ namespace PInvoke /// This structure is used by console functions to specify rectangular areas of console screen buffers, /// where the coordinates specify the rows and columns of screen-buffer character cells. /// - [StructLayout(LayoutKind.Sequential)] public struct SMALL_RECT { /// diff --git a/src/WtsApi32/WtsApi32+WTS_SESSION_INFO.cs b/src/WtsApi32/WtsApi32+WTS_SESSION_INFO.cs index 4f713b3b..1b23aecc 100644 --- a/src/WtsApi32/WtsApi32+WTS_SESSION_INFO.cs +++ b/src/WtsApi32/WtsApi32+WTS_SESSION_INFO.cs @@ -13,7 +13,6 @@ public static partial class WtsApi32 /// /// Contains information about a client session on a Remote Desktop Session Host (RD Session Host) server. /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [OfferIntPtrPropertyAccessors] public unsafe partial struct WTS_SESSION_INFO {