473,395 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Accessing COM (VB6) User-Defined types (UDTs) from a VB.NET dll

Hey all,

I was wondering if you could put me out of my misery (hopefully, not literaly)
..

I am currently trying to port some VB6 code to VB.NET because of a possible
significant performance improvement on a very large simulation based system.
All my variables are currently encapsulated in public UDTs. If I could
access these COM UDTs from a .NET dll, I will be sorted for porting the
important engine of the system without having to change any VB6 GUIs. I got
through the quagmire that is CCW (Com Callable Wrappers) and have a working .
NET dll with respect to accessing the .NET dll from VB6, but can't seem to
pass my UDTs from COM to .NET. They are complex multi-tiered, nested UDTs
within UDTs.

The question: can UDTs be passed (marshalled) from COM to .NET? If not,
should I scrap the UDTs, create a .NET structure or class and instantiate
that within COM in the first place?

cheers,
James
Nov 21 '05 #1
1 1569
On Wed, 19 Oct 2005 01:00:57 GMT, "jimfollett1 via DotNetMonster.com" <u14971@uwe> wrote:

¤ Thanks Paul for your reply.
¤
¤ If accessing COM UDTs from .NET is not really an option, then I have no easy
¤ solution to the problem. I had to use UDTs in the first place with VB6
¤ because VB6 classes don't handle arrays well, and now this has the knock-on
¤ effect that my code is not very portable to .NET - doh.
¤
¤ I am trying out replacing my COM UDTs with .NET public classes called from
¤ VB6, but proof of concept is no small task sadly. This is because the memory
¤ strucutres are a tad complex and a great deal of changes will have to be
¤ made to alter the implementation from array based structures to "collection"
¤ classes. If I used "ArrayList" classes would this change over be minimised
¤ because interating is the same type of coding, UBound exists etc?
¤
¤ cheers, James

I didn't want to imply that it wasn't an option just that it might be a bit of a hassle.

I'm probably not going to be able to help you with the nested UDT issue so you may want to try
posting your question in the microsoft.public.dotnet.framework.interop newsgroup.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tom Meuzelaar | last post by:
Hello: I'm using VB6 in VS enterprise. I'd like to place an HTML form inside a VB container, have a user fill out the form information, click a submit button, and then have the program capture...
13
by: Neil Brown | last post by:
Does anyone know how to access a MySQL server from vb6? Any suggestions appreciated. NB
4
by: Joseph Geretz | last post by:
Our company develops and markets a client/server application which is written in VB6 as a rich Win32 Client/Server application. For a variety of technological reasons we are looking to migrate...
3
by: Paul Phillips | last post by:
Here is what I am trying to do. I have an application that is written in VB 6 and in this application it is accessing a custom dll file that was created using Microsoft Fortran Professional 4.0....
1
by: Mullin Yu | last post by:
i found out that if i debug the web services that accessing a vb6 com (a dll file), other clients' request will be stalled until releasing from the debug mode. to me, the dll seems to be a queue...
1
by: NWx | last post by:
Hi, I'm an old developer, but didn't used SQL Server or MSDE to much before. I have NetSDK instance of MSDE installed on my PC by Net Framework SDK. All quickstart samples access it using...
6
by: Andy Barber | last post by:
Hi, I'm trying to write an app that reads data from a table into a string variable for later use in my program. Below is a snippet of the code I'm using, which compiles ok, but at runtime I get...
0
by: Nijazi Halimaji | last post by:
Hi Newsgroup I have written a .NET Component, made the check on "register for COM interop" in Build options, create a strong name and registered the assembly in the GAC. Accessing this...
0
by: RSH | last post by:
Hi, I'm a veteran VB6 programmer venturing up to C#. I have seen a ton of examples of C# using different techniques for accessing a SQL database but I was wondering if there is a way to work...
0
by: Tobester | last post by:
Hi I am having problems accessing a vb6 dll from ASP.Net. The vb6 dll is registered. I have then created an interop file using tlbimp. The interop has been added to the GAC. I can run the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.