Calling a VB6 DLL function with a complex User Defined Type (UDT) from C#
问题 I am writing a C# application to call a third party VB6 DLL. I have added reference to the VB6 DLL in the References->COM tab. A particular method in the DLL takes a VB6 UDT (User Defined Type) as a parameter. This UDT is shown as a struct in the auto generated .NET wrapper for COM. The struct has lots of child UDTs / structs as well as members of type VBA.Collection (as shown by .NET metadata). It also has regular data types like string, short, double, int, etc. I am initializing this struct