Problem with migration to C# (CoCreateInstanceEx)

Migration , Csharp , VB6 Vitoria, Spain
  • 11 years ago

    Hello to everyone,

    I have a problem while migrating a Visual Basic 6.0 application to C#. The thing is that my program has to communicate with a third-party application instancing an object. That application will be running and when I run my application, it should detect the active instance of a running object to execute some actions. In the Visual Basic version, that linking was done using the "CoCreateInstanceEx" method, also using “CLSIDFromString” and “CLSIDFromProgID” as support.

    So, my problem is that I don't know how to do this using equivalent C# methods to get the same result that I was obtaining in the Visual Basic 6.0 version. I would be very grateful if someone could give me that information.

    Thanks a lot in advance.

  • 11 years ago

    Julen,

    2 questions... Is your VB6 program a COM object? Does your VB6 program expose any Interfaces?

    Leon

  • 11 years ago

    Leading provider of Database Development, Business Intelligence, Software Development and Network Security. Discover our consultancy and support services for IT solutions.

    http://www.symtex.co.uk/

    SymTex Eliot Park Innovation Centre Barling Way Nuneaton Warwickshire CV10 7RH UK 0800 58 70 949

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' but 'That's funny...'” - Isaac Asimov