Trying to load a DLL - File is there but loading process fails

I created a DLL using this tutorial:

I followed it exactly, with the only difference being this line:

FString filePath = FPaths::Combine(*FPaths::GameDir(), TEXT("Binaries/Win64/"), TEXT("UnrealScreenshotDLL.dll"));

When debugging I can see that the path is correct, but the code fails on this line:

DLLHandle = FPlatformProcess::GetDllHandle(*filePath);

I’ve tried both 32 and 64 bit files but still no joy. For some reason I am unable to step through the code as the breakpoints in ‘GetDllHandle’ are not triggered.

Would appreciate any help with this as I have been stuck on it for hours now. Is there anything else I could be missing?



Please? Anyone?