clrinterop / clrinterop-issues-sandbox

0 stars 0 forks source link

TLBIMP converting C array of VARIANT_BOOL as C array of BOOL. #18

Open jozefizso opened 15 years ago

jozefizso commented 15 years ago

Issue from Fri, 26 Jun 2009 03:31:30 GMT Originally opened at https://clrinterop.codeplex.com/workitem/3803


IDL file:   [uuid(791B8E24-28A1-4d85-A00A-5C1EFE3E08EA)] library lib { [uuid(0AB14DF8-BF44-4e2e-A948-5D2D672FB678)] typedef struct A { VARIANT_BOOL B[4]; } A; }   Generated .NET code:   [StructLayout(LayoutKind.Sequential, Pack=2), Guid("0AB14DF8-BF44-4E2E-A948-5D2D672FB678")] public struct A { [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)] public bool[] B; }   Expected code:   [StructLayout(LayoutKind.Sequential, Pack=2), Guid("0AB14DF8-BF44-4E2E-A948-5D2D672FB678")] public struct A { [MarshalAs(UnmanagedType.ByValArray, SizeConst=4, ArraySubType=UnmanagedType.VariantBool)] public bool[] B; }   See also https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=470491 and http://clrinterop.codeplex.com/WorkItem/View.aspx?WorkItemId=3009