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. How to call a 'C' program function from VB code ?

How to call a 'C' program function from VB code ?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
8 Posts 5 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.
  • S Offline
    S Offline
    Sakthiu
    wrote on last edited by
    #1

    How to call a 'C' program function from VB code? Thanks

    Nice things do nice works

    V D L 3 Replies Last reply
    0
    • S Sakthiu

      How to call a 'C' program function from VB code? Thanks

      Nice things do nice works

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Perhaps, via a COM dll?

      S 1 Reply Last reply
      0
      • V Victor Nijegorodov

        Perhaps, via a COM dll?

        S Offline
        S Offline
        Sakthiu
        wrote on last edited by
        #3

        Can you please show some examples ? Thanks,

        Nice things do nice works

        1 Reply Last reply
        0
        • S Sakthiu

          How to call a 'C' program function from VB code? Thanks

          Nice things do nice works

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          So which part do you need help with: creating an exported function in C, or using said function in VB?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          S 1 Reply Last reply
          0
          • D David Crow

            So which part do you need help with: creating an exported function in C, or using said function in VB?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            S Offline
            S Offline
            Sakthiu
            wrote on last edited by
            #5

            both parts (full sample program) Thanks,

            D 1 Reply Last reply
            0
            • S Sakthiu

              both parts (full sample program) Thanks,

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Read point #2 here. As to how to export a function from a DLL, see here. For declaring a reference to an external function in a DLL, see here.

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

              1 Reply Last reply
              0
              • S Sakthiu

                How to call a 'C' program function from VB code? Thanks

                Nice things do nice works

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

                Hi, There is a really old article from 2005[^] that demonstrates how to do this. If you scroll to the bottom of the forum you might find a younger Randor lurking there. His username wasn't even red like a rooster yet. Best Wishes, -David Delaune

                _ 1 Reply Last reply
                0
                • L Lost User

                  Hi, There is a really old article from 2005[^] that demonstrates how to do this. If you scroll to the bottom of the forum you might find a younger Randor lurking there. His username wasn't even red like a rooster yet. Best Wishes, -David Delaune

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

                  :laugh:

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

                  _Microsoft MVP (Visual C++) (October 2009 - September 2013)

                  Polymorphism in C

                  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