Thread: DLL's C++ and api???

  1. #1
    Registered User code2d's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    87

    Question DLL's C++ and api???

    I am currently working on learning to code the windows api and coding C++.
    I have one stupid beginners question. I am wondering after you create a DLL that uses C++ how to link it to your windows application exe.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    you should use the lib file created togehter with the dll to link functions from the dll
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Then put the DLL in the path. The current directory works (but it eliminates any small amount of free disk space you might have, copying it for every program). \windows\system32 works, too, or any other directory in the path (your compiler's bin directory is probably in there too).
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Registered User code2d's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    87
    Any tutorials that someone can reference me to......

  5. #5

Popular pages Recent additions subscribe to a feed