diff --git a/generation/WinSDK/autoTypes.json b/generation/WinSDK/autoTypes.json index 56d2e6a7..8563f024 100644 --- a/generation/WinSDK/autoTypes.json +++ b/generation/WinSDK/autoTypes.json @@ -250,7 +250,7 @@ "NativeTypedef": true }, { - "Namespace": "Windows.Win32.Media", + "Namespace": "Windows.Win32.Foundation", "Name": "HTASK", "ValueType": "DECLARE_HANDLE", "InvalidHandleValues": [ -1, 0 ], diff --git a/generation/WinSDK/requiredNamespacesForNames.rsp b/generation/WinSDK/requiredNamespacesForNames.rsp index 0716b223..f20c7020 100644 --- a/generation/WinSDK/requiredNamespacesForNames.rsp +++ b/generation/WinSDK/requiredNamespacesForNames.rsp @@ -285,6 +285,7 @@ DEPRECATED_CLR_API_MESG=Windows.Win32.System.ClrHosting # endregion mscoree.h # region mssip.h MS_ADDINFO_CATALOGMEMBER=Windows.Win32.Security.Cryptography.Catalog +SIP_INDIRECT_DATA=Windows.Win32.Security.Cryptography # endregion mssip.h # region ntifs.h RtlConvertSidToUnicodeString=Windows.Win32.Security @@ -433,7 +434,6 @@ ILayoutStorage=Windows.Win32.System.Com.StructuredStorage ILockBytes=Windows.Win32.System.Com.StructuredStorage IRootStorage=Windows.Win32.System.Com.StructuredStorage #ISequentialStream=Windows.Win32.System.Com.StructuredStorage -IStorage=Windows.Win32.System.Com.StructuredStorage #IStream=Windows.Win32.System.Com.StructuredStorage #IPersistStream=Windows.Win32.System.Com.StructuredStorage IPersistStorage=Windows.Win32.System.Com.StructuredStorage diff --git a/sources/MetadataUtils/NamespaceDependencyUtil.cs b/sources/MetadataUtils/NamespaceDependencyUtil.cs index f9b26442..686b72e5 100644 --- a/sources/MetadataUtils/NamespaceDependencyUtil.cs +++ b/sources/MetadataUtils/NamespaceDependencyUtil.cs @@ -45,8 +45,11 @@ public IEnumerable GetNamespaceDependencies(string winm { DecompilerTypeSystem winmd1 = DecompilerTypeSystemUtils.CreateTypeSystemFromFile(winmdFileName); - foreach (var type1 in winmd1.GetTopLevelTypeDefinitions()) + var types = new Queue(winmd1.GetTopLevelTypeDefinitions()); + while (types.Any()) { + var type1 = types.Dequeue(); + if (type1.FullName == "") { continue; @@ -71,6 +74,14 @@ public IEnumerable GetNamespaceDependencies(string winm string broughtInBy = $"{type1.Name}.{field.Name}"; this.AddTypeDependency(type1, depends, broughtInBy, field.Type); } + + foreach (var nested in type1.GetNestedTypes()) + { + var def = nested.GetDefinition(); + if (def != null) { + types.Enqueue(def); + } + } } else if (type1.Kind == TypeKind.Class && type1.Name == "Apis") {