Locate DLL path by giving a DLLName

前端 未结 1 1742
梦谈多话
梦谈多话 2020-12-18 12:48

If I do

LoadLibrary(\"MyTest.dll\")

Windows will locate and load it from \"C:\\TestFolder\\Test\\MyTest.dll\", because

相关标签:
1条回答
  • 2020-12-18 13:31

    To load the DLL without running any malicious code inside, use LoadLibraryEx with the DONT_RESOLVE_DLL_REFERENCES and LOAD_LIBRARY_AS_DATAFILE flags.

    Then you can use GetModuleFileName.

    You should also read about all the other flags, which allow you to perform all the various searches Windows is capable of.

    0 讨论(0)
提交回复
热议问题