new to C++, so i apologize if this is a simple question.
should i call PushDllDirectory & PopDllDirectory everytime i want to call a specific function from a dll?
or is calling it once in my plugin’s StartupModule function enough to keep the functions callable throughout my code and i should pass it to my other classes, is that possible?
also should i call FreeDllHandle in the ShutdownModule or everytime i’m done with function i called?
So it sounds like you’re trying to link a thirdparty (self made?) dll and call that code. Could you provide a bit more context, specifically whether I’m assuming correctly, and on what your intentions are?
hey. yes I have a third party dll that’s already linked. I can call the functions with an .hpp that has been provided.
just wondering if calling FPlatformProcess::PushDllDirectory, FPlatformProcess::GetDllHandle & FPlatformProcess::PopDllDirectory once on StartupModule is enough to keep the dll (sorry if I’m saying this next part wrong) open in memory, so I can use those functions freely throughout the .cpp I’m making for ue4 until I call FPlatformProcess::FreeDllHandle on ShutdownModule.
or should I use Push, GetDllHandle & Pop everytime I want to call a function from this third party dll.