Plugin DLLs that depend on other DLLs

前端 未结 3 1339
后悔当初
后悔当初 2021-01-12 00:36

I am writing a DLL to plug into another (3rd party) application. The DLL will need to depend on another set of DLLs (for license reasons I cannot link statically).

I

相关标签:
3条回答
  • 2021-01-12 00:54

    Another option is to modify the PATH variable. Have a batch file for launching the main app, and set the PATH=%PATH%;%~dp0. This ensures a minimal footprint, with no additional traces left in the system after running.

    0 讨论(0)
  • 2021-01-12 01:04

    I can think of 3 ways.

    1. put the dlls in the same folder as your application (you cannot do this?)
    2. Use runtime linking. LoadLibrary() and GetProcAddress()
    3. Use a manifest http://msdn.microsoft.com/en-us/library/aa374182(VS.85).aspx

    But if the dll isn't in the same folder as the .exe, how are you going to know where it is? forget Windows not knowing, how do you know?

    0 讨论(0)
  • 2021-01-12 01:06

    you can specify the path of dll as the parameter of LoadLibrary().

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