Turn off GUI error messages around LoadLibraryA also in test Otherwise running test show GUI error messages which needs to be closed.