Problems compiling pshtoolkit

I have downloaded the pass the hash toolkit source codes from here. When I am compiling it with Visual Studio Ultimate 2010, I would get the following error:

findfuncs_msv10.obj : error LNK2019: unresolved external symbol _GetModuleInformation@16 referenced in function _FindMSV10Functions
whosthere-alt.obj : error LNK2019: unresolved external symbol _LsaFreeReturnBuffer@4 referenced in function _GetLogonSessionData
whosthere-alt.obj : error LNK2019: unresolved external symbol _LsaGetlogonSessionData@8 referenced in function _GetLogonSessionData
whosthere-alt.obj : error LNK2019: unresolved external symbol _LsaEnumerateLogonSession@8 referenced in function _main

How do I solve this error or is there another better way to compile the code. I'm new to C and I'm open to any suggestions.

Update: I have linked the Secur32.lib and the Psapi.lib and it compiles. Thanks alot


It sounds like you need to link to some additional libraries.

If you search for the functions listed in the errors (minus the leading underscore) in MSDN, it'll show you which libraries to link to.

eg

  • GetModuleInformation is in either Kernel32.lib or Psaip.lib, depending on the version of Windows you're using
  • LsaGetLogonSessionData is in Secur32.lib

  • You need to add the *.lib files to the Visual Studio project.

    例

    链接地址: http://www.djcxy.com/p/11290.html

    上一篇: 引用自身的外键列的作用(或目的)是什么?

    下一篇: 编译pshtoolkit的问题