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 do i call c++ dll function from another c ++ dll

how do i call c++ dll function from another c ++ dll

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
5 Posts 4 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.
  • J Offline
    J Offline
    jadhavjitendrar
    wrote on last edited by
    #1

    i m creating win32 dll in vc++(mfc) application.i have to call dll function from another dll. But i dont no the way,how to calling dll function from another dll. Please help me. Thanks in advance.

    R A L 3 Replies Last reply
    0
    • J jadhavjitendrar

      i m creating win32 dll in vc++(mfc) application.i have to call dll function from another dll. But i dont no the way,how to calling dll function from another dll. Please help me. Thanks in advance.

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      You could use the .lib file and header (the easier way). Or you could use LoadLibrary()[^] and GetProcAddress()[^] There are many beginner level tutorials on DLLs at CP. Just search for those and give some of them a read.

      “Follow your bliss.” – Joseph Campbell

      1 Reply Last reply
      0
      • J jadhavjitendrar

        i m creating win32 dll in vc++(mfc) application.i have to call dll function from another dll. But i dont no the way,how to calling dll function from another dll. Please help me. Thanks in advance.

        A Offline
        A Offline
        Adam Roderick J
        wrote on last edited by
        #3

        For that purpose, you can either rely on static linking or dynamic linking. 1. Static Linking a. Add the lib corresponding to the DLL(DLL that is to be called) in Project Settings->Link->Input->Object/library modules. b. Add the Include file pf the DLL into your project dsp. c. Call the function after including the header. 2. Dynamic linking- Usually done in case, where you have Def([^]) files, which is mentioned in the above comment by rajesh.

        Величие не Бога может быть недооценена.

        modified on Friday, February 5, 2010 6:11 AM

        1 Reply Last reply
        0
        • J jadhavjitendrar

          i m creating win32 dll in vc++(mfc) application.i have to call dll function from another dll. But i dont no the way,how to calling dll function from another dll. Please help me. Thanks in advance.

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

          Pay attention to Rajeshs post, LoadLibrary Getprocaddress are great functions to learn to use. You get a smaller loaded image by using dynamic linking dont forget!

          Morality is indistinguishable from social proscription

          R 1 Reply Last reply
          0
          • L Lost User

            Pay attention to Rajeshs post, LoadLibrary Getprocaddress are great functions to learn to use. You get a smaller loaded image by using dynamic linking dont forget!

            Morality is indistinguishable from social proscription

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            Dude, you've picked on a univoter. :)

            “Follow your bliss.” – Joseph Campbell

            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