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. Error in loading DLL in Windows XP and WIndows 2003 Server

Error in loading DLL in Windows XP and WIndows 2003 Server

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminwindows-adminalgorithmshelp
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.
  • B Offline
    B Offline
    BlrBoy
    wrote on last edited by
    #1

    Hello All I am trying to load a DLL dynamically using LoadLibrary (). It works fine with Windows 2000 Professional. But when i am trying to load it in XP or 2003 Server I get error "The specified module could not be found" Error. DLL is present in the path where EXE is present. (C:\Program Files\Test Application\MyDll.dll"). When loading the DLL i am specifing full path as parameter. I placed the DLL path to C:\ and in System32 directory and changed the path still I get the error. DLL is basic C DLL. Unfortunately I did not get lib file along with DLL so i have load that DLL dynamically only. For MSDN i found that Windows Server 2003, Windows XP SP1: The default value of HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode is 1 (current directory is searched after the system and Windows directories). But after searching Windows Directory it has to come to current directory to find DLL. But it fails :doh: Please tell me any idea why this strange behaviour with Windows XP and 2003 Server!!!!. Thanks for your Time Ravi

    M 1 Reply Last reply
    0
    • B BlrBoy

      Hello All I am trying to load a DLL dynamically using LoadLibrary (). It works fine with Windows 2000 Professional. But when i am trying to load it in XP or 2003 Server I get error "The specified module could not be found" Error. DLL is present in the path where EXE is present. (C:\Program Files\Test Application\MyDll.dll"). When loading the DLL i am specifing full path as parameter. I placed the DLL path to C:\ and in System32 directory and changed the path still I get the error. DLL is basic C DLL. Unfortunately I did not get lib file along with DLL so i have load that DLL dynamically only. For MSDN i found that Windows Server 2003, Windows XP SP1: The default value of HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode is 1 (current directory is searched after the system and Windows directories). But after searching Windows Directory it has to come to current directory to find DLL. But it fails :doh: Please tell me any idea why this strange behaviour with Windows XP and 2003 Server!!!!. Thanks for your Time Ravi

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      There are probably other DLLs which this DLL depends on, which you also need to redistribute. Use the depends[^] tool to discover what they are.

      Stability. What an interesting concept. -- Chris Maunder

      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