Skip Dynaloader, do it the simpler way.
in reply to Re^9: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
in thread if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
What happens with Dependency Walker and without Dependency Walker when running the above script?
my $ret = Win32::LoadLibrary('C:\Perl\site\lib\auto\blah\foo.dll');
print "ret=$ret glr=".Win32::GetLastError()."\n";
0xc000007b is STATUS_INVALID_IMAGE_FORMAT, which maps to ERROR_BAD_EXE_FORMAT which is "%1 is not a valid Win32 application.".
You can also read http://code.google.com/searchframe#S3vzerue4i0/trunk/reactos/lib/rtl/image.c&q=LdrRelocateImageWithBias%20package:reactos-mirror\.googlecode\.com&l=433 to give you some ideas on what happened.