Click here to Skip to main content
13,045,387 members (79,430 online)
Rate this:
Please Sign up or sign in to vote.
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 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 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 26-Sep-10 9:57am
Updated 26-Sep-10 10:58am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 26 Sep 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100