I don't know much about Com Plus Interop services in .NET - I let .NET do all the dirty work and I cross my fingers it'll work. Well, now I'm stuck.
I've got a reference to a COM DLL compiled with VB6 in my VS 2010 C# program. This is an invoice I'm creating.
I instantiate an object:
UIInvoice Invoice = new CUIInvoice();
And then I set some invoice header properties:
Invoice.set_InvoiceType("VO");
Invoice.set_InvoiceTypeID(2);
And now, I want to create some invoice detail lines, which I do by calling the add method of a child object of the invoice:
Invoice.InvoiceDetails.Add("StringParam1", "StringParam2", Invoice);
The third parameter of the function call is defined in my VB6 Add function as:
ByRef Parent As Object
When I run my .NET program, I get a "type mismatch" error when I hit the Add line.
Can anyone suggest, in simplistic terms, a way I can get this to work?
ref Invoice
in C#. Guess you're using C# version 4. Nothing else is obvious, it just doesn't like CUIInvoice to be a parent. Maybe because of "UI". – Hans Passant