COM Interop – C# type consumed by VB6 program – Part 2. Still searching…

If I define the type in C# as a public class instead of as a struct, I still get a compile error on the same line as before in VB6.  This time the error message is: “Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions”.

Cool.  Not.

Comments (1)
  1. Frans Bouma says:

    user defined types in VB are not something related to COM, but are a VB thing. THe error clearly states that the user defined type is stored inside a variant, it is not used as a com object.

Comments are closed.

Skip to main content