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. DLL

DLL

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 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.
  • A Offline
    A Offline
    act_x
    wrote on last edited by
    #1

    I am trying to use a DLL in my Application . So i have been provided with the following MyDll.dll MyDll.h MyDll.lib I placed all these under a folder inside my Project called MyDll Files I added the Library by going into Project-->Settings--> Link Tab and adding DBusFiles/DBusDrv.lib Now I am writing a Wrapper classes for the DLL functionality called CMyDllInterface CMyDllInterface ::CMyDllInterface { // Some call to DLL } I get a message box with a message (with n different path names ) saying that it couldnt find the DLL . I know that if i put the dll inside WINNT\System32 it will work , but is there a way I can do it the other way ? Engineering is the effort !

    M A 2 Replies Last reply
    0
    • A act_x

      I am trying to use a DLL in my Application . So i have been provided with the following MyDll.dll MyDll.h MyDll.lib I placed all these under a folder inside my Project called MyDll Files I added the Library by going into Project-->Settings--> Link Tab and adding DBusFiles/DBusDrv.lib Now I am writing a Wrapper classes for the DLL functionality called CMyDllInterface CMyDllInterface ::CMyDllInterface { // Some call to DLL } I get a message box with a message (with n different path names ) saying that it couldnt find the DLL . I know that if i put the dll inside WINNT\System32 it will work , but is there a way I can do it the other way ? Engineering is the effort !

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      The DLL should go in the same directory as your EXE. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD

      B 1 Reply Last reply
      0
      • M Michael Dunn

        The DLL should go in the same directory as your EXE. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ Strange things are afoot at the U+004B U+20DD

        B Offline
        B Offline
        berndg
        wrote on last edited by
        #3

        Michael Dunn wrote: The DLL should go in the same directory as your EXE. ... or anywhere else on your search path. The MSDN description of the ::LoadLibrary() function details the search algorithm.

        1 Reply Last reply
        0
        • A act_x

          I am trying to use a DLL in my Application . So i have been provided with the following MyDll.dll MyDll.h MyDll.lib I placed all these under a folder inside my Project called MyDll Files I added the Library by going into Project-->Settings--> Link Tab and adding DBusFiles/DBusDrv.lib Now I am writing a Wrapper classes for the DLL functionality called CMyDllInterface CMyDllInterface ::CMyDllInterface { // Some call to DLL } I get a message box with a message (with n different path names ) saying that it couldnt find the DLL . I know that if i put the dll inside WINNT\System32 it will work , but is there a way I can do it the other way ? Engineering is the effort !

          A Offline
          A Offline
          AntonlioX
          wrote on last edited by
          #4

          searches dll in the following sequence: The directory from which the application loaded. The current directory. Windows 95 and Windows 98: The Windows system directory. Use theGetSystemDirectory function to get the path of this directory. Windows NT: The 32-bit Windows system directory. Use the GetSystemDirectory function to get the path of this directory. The name of this directory is SYSTEM32. Windows NT: The 16-bit Windows system directory. There is no function that obtains the path of this directory, but it is searched. The name of this directory is SYSTEM. The Windows directory. Use theGetWindowsDirectory function to get the path of this directory. The directories that are listed in the PATH environment variable. AntonlioX

          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