Click here to Skip to main content
15,888,129 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I would like to share my following issue:

I have developped an application in VB6 and the data objects are defined inside an OLE COM dll.

The object I am using to describe my issue in a IDispatch object which can be created via CreateObject("").

I am trying to convert piece by piece the vb6 application to VB.NET.
I am actually focussed on the main app. The components used by the main are developped in vb6 activeX dll.

Let's me describe the issue I am trying to solve:
I have created a simple .NET mdi mainframe in VB.NET.
In this app, I have created the ole com object via CreateObject("") to be able to share it to the current vb6 activex.dll.

To transmit this object into the current activeX dlls, I have developped a wrapper vb.net dll com class (interop COM flag activated).

The object is transmitted to the wrapper dll via tcp channel (.net remoting).

This object can be correctly invoked into the wrapper com class but is not accessible into vb6 via the available wrapper function (Function GetMyObject as Object).

The error code vb6 returns me is always 'object type not defined and the object returned is set to nothing'.

Once I take a look to the object type lib viewer, the vb.net type object does not seem to be recognized by vb6. Maybe is it interpreted as variant by default ???

If I use a standard type like string, integer, ..., vb6 can retrieve it correctly but once I work with object, this does not seem to be marshalled.

I would like to know if somebody has already experienced this kind of issue ?

What could you recommand me to retrieve the ole dispatch object into my vb6 activex dll ?

If I create the ole object directly into the wrapper dll, this is then returned correctly to vb6.

I am actually wondering what / where the problem could be located ?

Thank you very much in advanced for any tips / info, you could provide me to solve the issue.
Posted
Updated 26-Sep-10 10:58am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900