Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Answered Detours Library Error

  • Saturday, April 19, 2008 5:32 PM
     
     

    Hi

    I'm trying to use Detours.lib, but when ever i compiled my project I got this error

     

    Error 1 error LNK2019: unresolved external symbol "struct HINSTANCE__ * __stdcall Detoured(void)" (?Detoured@@YGPAUHINSTANCE__@@ XZ) referenced in function _DetourAttachEx @ 20 detours.lib 

    i'm trying to compile the "simple" example included with the Library documentation

    Any Idea how to solve it?

All Replies

  • Sunday, April 20, 2008 4:38 PM
     
     Answered

    That symbol should be defined by the import library for detoured.dll. Do you build with the makefile?

     

    Does the linker look for detoured.lib (this is an input on cl.exe command line for the sample makefile)?

    If so, does the import library provide the function in question (dumpbin /LINKERMEMBER detoured.lib will tell you)?

     

    -hg

     

  • Monday, April 21, 2008 4:09 AM
     
     

    Got It,

    Just need to Link both detours.lib and detoured.lib