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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. using dll

using dll

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
5 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.
  • S Offline
    S Offline
    samira forooghi
    wrote on last edited by
    #1

    hi everyone. i want use dll in mfc project,without using lib and header file. please help me.

    J M 2 Replies Last reply
    0
    • S samira forooghi

      hi everyone. i want use dll in mfc project,without using lib and header file. please help me.

      J Offline
      J Offline
      Jonathan Darka
      wrote on last edited by
      #2

      If you know the names of the functions in the DLL, then you can just use LoadLibrary() and GetProcAddress().


      Darka [Xanya] "I am not a slave to a god that doesn't exist."

      S 1 Reply Last reply
      0
      • J Jonathan Darka

        If you know the names of the functions in the DLL, then you can just use LoadLibrary() and GetProcAddress().


        Darka [Xanya] "I am not a slave to a god that doesn't exist."

        S Offline
        S Offline
        samira forooghi
        wrote on last edited by
        #3

        aftr than useing GetProcessAddress ,i dont khnow how call function and pass parameters.

        1 Reply Last reply
        0
        • S samira forooghi

          hi everyone. i want use dll in mfc project,without using lib and header file. please help me.

          M Offline
          M Offline
          mpk1979
          wrote on last edited by
          #4

          you need to take a pointer to a function that has been exported from DLL ,GetProcAddress in client will be returning that function's address which you need to assign to that pointer. using this pointer you can call the functionality present in the DLL. For Ex: typedef void (* pFn)(int); pFn fn; fn=(pFn)GetProcAddress( ); fn(); mpk1979

          S 1 Reply Last reply
          0
          • M mpk1979

            you need to take a pointer to a function that has been exported from DLL ,GetProcAddress in client will be returning that function's address which you need to assign to that pointer. using this pointer you can call the functionality present in the DLL. For Ex: typedef void (* pFn)(int); pFn fn; fn=(pFn)GetProcAddress( ); fn(); mpk1979

            S Offline
            S Offline
            samira forooghi
            wrote on last edited by
            #5

            tank you very much. i used dll in my project successfully.:)

            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