CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: C++ and VB

  1. #1
    Join Date
    Jul 1999
    Location
    Israel
    Posts
    140

    C++ and VB

    I want to build an application in VC++ that will "talk" with an application in VB
    What is the best way to do it?
    Is there any place i can read about it?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: C++ and VB

    IMHO the "best" way is via COM.
    make your VB "app" an ActiveX DLL (or exe), import the Typelibrary of the COM component into your VC project via the "#import" directive in VC 6 and voila call the properties and methods "the COM way".

    For further reading, refer to MSDN, particularly the knowledgebase.


  3. #3
    Join Date
    Sep 1999
    Location
    Germany, Cologne
    Posts
    83

    Re: C++ and VB

    If you want to have to apps running at the same time and you want to speak at each other, try to send Windows-Messages. There's a way to handle WM-Messages in VB.

    Otherwise try to build in VC an ActiveX-Control (.OCX). It's VERY easy to use it with VB.

    Another way is to build a VC DLL (it's no real app, but it can show dialogs etc.). Use _stdcall function() to export functions because VB can only import functions with this convention.

    'hope it'll help you


    'CMichael


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured