Click here to Skip to main content
13,513,618 members
Rate this:
Please Sign up or sign in to vote.
Hello Everyone,

I would like to share with you the following question I have in my mind about the migration procedure from the current code implemented in Visual Studio 6 to Visual Studio 201x.

The current VS6 application has a data layer based on OLE IDispatch interface.
This was to allow me to integrate Visual Basic 6 components into my main application and to exchange the data easily between these two languages.

Now come the time for migration and I would like to implement my application in c# under Visual Studio 2010.

All my current data are persist under compound files and under flat stream files.

I wonder if this is a good idea to duplicate the data layer to c# classes and via a translation method grab the data from the dispatch objects ?

What could you advise me about that strategy ?

Let's say I have the following set of ole automation objects:


All of them have a set of properties and methods.
They also have the IPersistStorage and IPersistStream interface available.

If I define c# classes let's say:


They will have maybe after cleanup more or less the same amount of methods and properties.

How would it be better to transmit the data between the objects and the classes in an efficient way ?

Here were my ideas:

1. Keep the current automation data model for the implementation of my c# application. This will avoid data translation. The problem is about the implementation of these automation object in the unmanaged side. Would this have an impact on the performance ?

2. Create based on the direction we want to go an automation object or a class via a data layer c# library where the main data set is persisted in memory. This can invoke certainly some performance issues. What about file loading or saving operations?

3. Implement the c# classes in a library as an envelop to the current ole automation objects. Use these automation objects to invoke properties, methods and to stored the current loaded/created data set. This will open ways to replace later on the required c# classes with their new functionality and data formats.

What do you think about these possible ideas ? Do you see other alternatives to cover that issue in an efficient way ?

Thank you very in advance.
Posted 14-Nov-12 6:28am

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 |
Web03 | 2.8.180417.1 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2018
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