GetLastError returns the last error message, it must be called immediately after the function that has failed, with no other function calls in-between. This is not the case for your code (you even have a qDebug between them), so it's useless in this case.
Put the call after the LoadLibrary, assign it to a variable, and either output it there, or put a breakpoint and check the value in the debugger.
Bookmarks