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. Loading DLL inside the code

Loading DLL inside the code

Scheduled Pinned Locked Moved C / C++ / MFC
questionperformancehelp
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.
  • N Offline
    N Offline
    Nacho Chip
    wrote on last edited by
    #1

    Hello, I would like to know what is the proper way to use LoadLibrary() when loading DLLs. In my project, it depends on couple DLL files to run. Those DLLs need to sit in Windows\win32\ or the same folder as the executable file. However, I want to put those DLL filew into some fixed place and when my application starts to run, I can load them to the memory. I try to use LoadLibrary() function but I don't know where should I call this function in the code. It is because everytime I start the program, I already get the "missing dll" error and the program get terminated before any code has been run. Any idea about this? Am I missing something? Thanks! Nacho -- modified at 18:12 Tuesday 9th May, 2006

    N H 2 Replies Last reply
    0
    • N Nacho Chip

      Hello, I would like to know what is the proper way to use LoadLibrary() when loading DLLs. In my project, it depends on couple DLL files to run. Those DLLs need to sit in Windows\win32\ or the same folder as the executable file. However, I want to put those DLL filew into some fixed place and when my application starts to run, I can load them to the memory. I try to use LoadLibrary() function but I don't know where should I call this function in the code. It is because everytime I start the program, I already get the "missing dll" error and the program get terminated before any code has been run. Any idea about this? Am I missing something? Thanks! Nacho -- modified at 18:12 Tuesday 9th May, 2006

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      Read the documentation for LoadLibrary.


      Nibu thomas Software Developer Faqs by Michael dunn

      1 Reply Last reply
      0
      • N Nacho Chip

        Hello, I would like to know what is the proper way to use LoadLibrary() when loading DLLs. In my project, it depends on couple DLL files to run. Those DLLs need to sit in Windows\win32\ or the same folder as the executable file. However, I want to put those DLL filew into some fixed place and when my application starts to run, I can load them to the memory. I try to use LoadLibrary() function but I don't know where should I call this function in the code. It is because everytime I start the program, I already get the "missing dll" error and the program get terminated before any code has been run. Any idea about this? Am I missing something? Thanks! Nacho -- modified at 18:12 Tuesday 9th May, 2006

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        use LoadLibrary for load your dll and use GetProcAddress for functions in dll and in the end use FreeLibrary

        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