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. Managed C++/CLI
  4. How to avoid loading an already loaded shared library

How to avoid loading an already loaded shared library

Scheduled Pinned Locked Moved Managed C++/CLI
c++tutorial
2 Posts 2 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.
  • Y Offline
    Y Offline
    Yashusid
    wrote on last edited by
    #1

    Hi, I have one JNI shared libray which depends on a CPP library. In my module loading CPP shared library first and loading JNI library, eventhough the dependant library is loaded JNI library tries to load CPP shared library. Please let me know how to avoid loading an already loaded shared library .... Thanks, Yashu

    L 1 Reply Last reply
    0
    • Y Yashusid

      Hi, I have one JNI shared libray which depends on a CPP library. In my module loading CPP shared library first and loading JNI library, eventhough the dependant library is loaded JNI library tries to load CPP shared library. Please let me know how to avoid loading an already loaded shared library .... Thanks, Yashu

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Yashusid wrote:

      I have one JNI shared libray

      As in Java Native Interface? If so this is not even close to being the correct forum. If not then what is it? Supply a link. In terms of loading modules into Windows Processes put all the modules in a single location. The loader will see that it is already loaded and not load it again. link[^] Note Use extreme care when using this value. If LoadLibrary or LoadLibraryEx is called for the same DLL after the DLL is loaded, then the DLL references will not have been resolved. This is because the second call to LoadLibrary or LoadLibraryEx simply returns a handle to the already loaded DLL. In this case, the process is likely to terminate abnormally.

      led mike

      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