Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB6 VB.NET
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 26-Sep-10 10:57am
Edited 26-Sep-10 11:58am
(no name)178.5K
v2

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

  Print Answers RSS
0 OriginalGriff 365
1 Sergey Alexandrovich Kryukov 319
2 CPallini 275
3 DamithSL 214
4 Maciej Los 185
0 OriginalGriff 5,455
1 DamithSL 4,457
2 Maciej Los 3,885
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,115


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 26 Sep 2010
Copyright © CodeProject, 1999-2014
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