From 73a41195897f0cd84fc036bd5987bbfad530a191 Mon Sep 17 00:00:00 2001 From: ElektroKill Date: Mon, 10 Nov 2025 14:33:54 +0100 Subject: [PATCH] Add support for `TypeAttributes.ExtendedLayout` --- src/DotNet/ExportedType.cs | 5 +++++ src/DotNet/TypeAttributes.cs | 2 ++ src/DotNet/TypeDef.cs | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/src/DotNet/ExportedType.cs b/src/DotNet/ExportedType.cs index 270f556f6..4cccc504d 100644 --- a/src/DotNet/ExportedType.cs +++ b/src/DotNet/ExportedType.cs @@ -337,6 +337,11 @@ public TypeAttributes Layout { /// public bool IsExplicitLayout => ((TypeAttributes)attributes & TypeAttributes.LayoutMask) == TypeAttributes.ExplicitLayout; + /// + /// true if is set + /// + public bool IsExtendedLayout => ((TypeAttributes)attributes & TypeAttributes.LayoutMask) == TypeAttributes.ExtendedLayout; + /// /// Gets/sets the bit /// diff --git a/src/DotNet/TypeAttributes.cs b/src/DotNet/TypeAttributes.cs index 2ae0aa21b..bae7b4930 100644 --- a/src/DotNet/TypeAttributes.cs +++ b/src/DotNet/TypeAttributes.cs @@ -35,6 +35,8 @@ public enum TypeAttributes : uint { SequentialLayout = 0x00000008, /// Layout is supplied explicitly ExplicitLayout = 0x00000010, + /// Layout is supplied via the System.Runtime.InteropServices.ExtendedLayoutAttribute + ExtendedLayout = 0x00000018, /// Use this mask to retrieve class semantics information. ClassSemanticsMask = 0x00000020, diff --git a/src/DotNet/TypeDef.cs b/src/DotNet/TypeDef.cs index e46b36bcd..9c2c94327 100644 --- a/src/DotNet/TypeDef.cs +++ b/src/DotNet/TypeDef.cs @@ -770,6 +770,11 @@ public TypeAttributes Layout { /// public bool IsExplicitLayout => ((TypeAttributes)attributes & TypeAttributes.LayoutMask) == TypeAttributes.ExplicitLayout; + /// + /// true if is set + /// + public bool IsExtendedLayout => ((TypeAttributes)attributes & TypeAttributes.LayoutMask) == TypeAttributes.ExtendedLayout; + /// /// Gets/sets the bit ///