diff --git a/Source/Bind/Structures/Parameter.cs b/Source/Bind/Structures/Parameter.cs index df596e64..49518d70 100644 --- a/Source/Bind/Structures/Parameter.cs +++ b/Source/Bind/Structures/Parameter.cs @@ -224,9 +224,9 @@ namespace Bind.Structures StringBuilder sb = new StringBuilder(); if (Flow == FlowDirection.Out) - sb.Append("[Out] "); + sb.Append("[OutAttribute] "); else if (Flow == FlowDirection.Undefined) - sb.Append("[In, Out] "); + sb.Append("[InAttribute, OutAttribute] "); if (Reference) { diff --git a/Source/Bind/Structures/Type.cs b/Source/Bind/Structures/Type.cs index 758d8e22..c5c83222 100644 --- a/Source/Bind/Structures/Type.cs +++ b/Source/Bind/Structures/Type.cs @@ -180,7 +180,26 @@ namespace Bind.Structures { get { - bool compliant = !(CurrentType.Contains("UInt") || CurrentType.Contains("SByte")); + bool compliant = true; + + switch (CurrentType.ToLower()) + { + case "sbyte": + case "ushort": + case "uint": + case "ulong": + case "uintptr": + compliant = false; + break; + + default: + compliant = Pointer == 0; + break; + } + + return compliant; + + /* if (Pointer != 0) { compliant &= CurrentType.Contains("IntPtr"); // IntPtr's are CLSCompliant. @@ -188,6 +207,7 @@ namespace Bind.Structures compliant |= (Settings.Compatibility & Settings.Legacy.NoPublicUnsafeFunctions) != Settings.Legacy.None; } return compliant; + */ //return compliant && (!Pointer || CurrentType.Contains("IntPtr")); //return compliant && !(Pointer && ((Settings.Compatibility & Settings.Legacy.NoPublicUnsafeFunctions) == Settings.Legacy.None));