Hello Guys,

So... no one has an idea on how to resolve this (message bellow)? Maybe 
someone from Active State can chime in?

Thanks again in advance for any response.

Cheers,

Francisco


-----Mensaje original----- 
From: Francisco Zarabozo
Sent: Sunday, February 05, 2012 8:06 PM
To: Active State Perl Mailing List
Subject: Win32::OLE not working as expected over Perl x64


Hello All,

I hope someone can give me a light on this. I’m having an issue migrating my
x86 system (Apache and ModPerl mainly) to an x64 Windows server, where I’m
trying to use Apache 2.2 and Perl 5.12 both 64 bits.

The following code, executed on the same machine (with Windows 7 x64) but
using ActiveState Perl 5.12 x86 works well, but when using ActiveState Perl
5.12 x64 it doesn’t work:


-------------------------------------------------------------------------------
use strict;
use warnings;
use Win32::OLE;

my $obj = new Win32::OLE 'GeoIPCOMex.GeoIPex';
if (defined $obj) { # It works
    print ref($obj)."\n";
} else { # It didn't work
    print "Error loading object: ".Win32::OLE->LastError."\n";
}
-------------------------------------------------------------------------------

When trying it over Perl 5.12 x86, it prints (as expected):

Win32::OLE


But when trying it over Perl 5.12 x64, it prints:

Error loading object: Win32::OLE(0.1709) error 0x80040154: "Clase no
registrada" (spanish for "Class not registered")


Of course, the class IS registered as you can see on the 32 bit Perl
execution.

I'm guessing this has to do with 32 bit and 64 bit DLLs and that Win32::OLE
works with 32 or 64 bit registrations/DLLs accordingly to whether you are
using a 32 or 64 bit version of Perl. But, I'm just guessing and I'm not
really sure about what the problem is or how to solve it.

Does any one know the real reason for this to fail over Perl x64 and how to
solve it?

Thanks in advance for any comment!


Best regards,

Francisco




_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to