Does it make a difference if you load a custom Win32 dll file or a Win64 dll file?

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

The short answer is that it can be done, BUT it’s not trivial. It’s going to go through something called COM to pass messages to a 32 bit process, so to make up for it being complicated, it’s also going to be slow.

If you need less that 2 Gb or so of texture/audio at once, I’d just go 32 bit.