returning and accessing an object via com
- From: "Marius Antonieri" <toidt@xxxxxx>
- Date: Mon, 14 Jul 2008 17:50:38 +0200
Hi,
at first a big compliment for this great article and the translation to c#.
at second, my question:
I'm developing a chartcomponent in c# which should be accessed from vb6
via com. I have got a method which is called accBar. It adds a Bar to the
diagramm and should return the barObject. The problem is, every time I try
to handle the returning value vb6 tells me of a type missmatch error.
my code, perhaps it helps:
Private Sub Command2_Click()Dim gb2 As GanttControl.GanttBarNgb2 =
GanttControl1.addBar("lala", 35, 56, "lalala")End Sub
Is it possible to return the interface from c# or should I return the
object itself?
I hope someone can help me with a hint, I'm looking for a solution now,
for 3 days .
greetz Marius
.
Relevant Pages
- Re: MS, Enough is Enough!
... translation of VB6 would result in a messy difficult to maintain .NET ... It would have been possible to keep the existing language, but extend it to make it fully OO, and add the ability to access the .NET framework. ... There is no reason why MS could not have made VB7, which would have compiled existing VB6 code but was also fully OO. ... That doesn't stop my .NET apps being slower than my C++/VB6 native apps, or mean that my existing VB6 code-base can move forward to take advantage of the .NET framework. ... (microsoft.public.vb.general.discussion) - Re: ifstream in VB6
... Could anybody please help translating this to VB6? ... you can't create an exact translation anyway since ... that is a template function. ... (microsoft.public.vb.general.discussion) - Re: MS, Enough is Enough!
... You cannot build an entirely sucessfull translation tool, ... system which fails to take advantage of what object orietated languages ... VB6 is not a proper object orientated language. ... Start rebuilding with you favoured .NET language using best practices ... (microsoft.public.vb.general.discussion) - Re: Layout of a file written by VB6?
... > I have some binary files wrtten by a VB6 application (using FreeFile, ... it seems like a fairly straightforward hack, ... translation. ... (microsoft.public.vb.general.discussion) |
|