Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB6 C++ C# NET
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:
 
Projects
  Project
     Workspaces
        Workspace
          ... 
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:

NetProjects
  NetProject
     NetWorkspaces
        NetWorkspace
          ...
 
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.
MiQi.
Posted 14-Nov-12 7:28am

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

  Print Answers RSS
0 OriginalGriff 7,205
1 DamithSL 5,114
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,747
4 Kornfeld Eliyahu Peter 4,474


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 14 Nov 2012
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