I have been trying to load a Win32 dll file (test.dll) directly into my plugin StartupModule() function present in
my FTestPlugin: public ITestPlugin class
the way I’m loading the dll is:
void FTestPlugin::StartupModule()
{
FString DllFilename = FPaths::ConvertRelativePathToFull(FPaths::Combine(*FPaths::GameDir(),
TEXT("Binaries"), TEXT("Win64"), TEXT("test.dll")));
void* DLLHandle = NULL;
DLLHandle = FPlatformProcess::GetDllHandle(*DllFilename);
UE_LOG(LogPlugin, Error, TEXT("______Just Before the DLL:%s"), *DllFilename);
if (DLLHandle == NULL)
{
UE_LOG(LogPlugin, Error, TEXT("_____NULL DLLHANDLE"),);
}
else
{
UE_LOG(LogPlugin, Error, TEXT("_____Entered DLLHANDLE"),);
}
}
when I try to load the Win32 dll the DLLHandle is always Null but when I try the Win64 dll I get that it exists (and I can see the output log in UE4 )
I was wondering if there is any way I can get this Win32 dll to load without having to compile my game project in 32 bit build mode
Does any one else have any experience loading dlls directly into a class in Unreal engine 4?
I am still looking through the engine Source code for examples, but the closest one to what I wanted to do was in SimplygonMeshReduction.cpp (starting in line 328)
any suggestions or ideas are welcome