Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Calling VB executable from MFC

Calling VB executable from MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncomhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anu_Bala
    wrote on last edited by
    #1

    Hi, Im having one VB executable file named as VSCModule.exe I want to use this in MFC to use the functions in that executable. Previously ,it has used in VB Macros. Just they add referennces , Tool->References and select VSCModule.exe. VBA coding :

    Dim vsc As New VSCmodule.vsc
    vsc.getVar("PL", "PVC101", "PV").Value 'getVar is function belongs to VSCModule

    Just i want to know.Can i use this exe in MFC? If it is so How can i use that? Im using VS2008 version. I add reference in VC++ in the same way, its get added in References Column as

    Interop.VSCModule.1.1

    I dont know how to proceed after this? Pls kindly help me.

    Anu

    _ L 2 Replies Last reply
    0
    • A Anu_Bala

      Hi, Im having one VB executable file named as VSCModule.exe I want to use this in MFC to use the functions in that executable. Previously ,it has used in VB Macros. Just they add referennces , Tool->References and select VSCModule.exe. VBA coding :

      Dim vsc As New VSCmodule.vsc
      vsc.getVar("PL", "PVC101", "PV").Value 'getVar is function belongs to VSCModule

      Just i want to know.Can i use this exe in MFC? If it is so How can i use that? Im using VS2008 version. I add reference in VC++ in the same way, its get added in References Column as

      Interop.VSCModule.1.1

      I dont know how to proceed after this? Pls kindly help me.

      Anu

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You can execute any EXE from MFC using the CreateProcess API.

      «_Superman_»  _I love work. It gives me something to do between weekends.

      _Microsoft MVP (Visual C++)

      Polymorphism in C

      1 Reply Last reply
      0
      • A Anu_Bala

        Hi, Im having one VB executable file named as VSCModule.exe I want to use this in MFC to use the functions in that executable. Previously ,it has used in VB Macros. Just they add referennces , Tool->References and select VSCModule.exe. VBA coding :

        Dim vsc As New VSCmodule.vsc
        vsc.getVar("PL", "PVC101", "PV").Value 'getVar is function belongs to VSCModule

        Just i want to know.Can i use this exe in MFC? If it is so How can i use that? Im using VS2008 version. I add reference in VC++ in the same way, its get added in References Column as

        Interop.VSCModule.1.1

        I dont know how to proceed after this? Pls kindly help me.

        Anu

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Anu_Bala wrote:

        Can i use this exe in MFC

        If I understand you correctly, you want to know if you can call functions inside the VB exe from your MFC program. No you cannot do that. If those fucntions were in a DLL you could but not an exe. You can run the exe and get a result from the VB exe if that will suit your purpose.

        Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups