For my sins, I run a legacy Perl 5.24 install on which I have built an app of 15 years standing. Recently I have discovered that my Microsoft Outlook integration needed to send scheduled emails breaks on Windows boxes with 64 bit Office installs, while it runs fine with 32 bit Office installs.
The exact error thrown is:
No type library matching "Microsoft Outlook" found at ../Perl/lib/Mail/Outlook.pm line 111
While there do appear to be plenty of people who've encountered this issue, I do have some constraints which is why their solutions might not apply to my situation. First, I am unfortunately not open to upgrading my installation. Given enough time, I'd love to do that but there's never enough time, especially when there are tight deadlines! Second, I do not have the ability to directly manually tinker with the Registry settings on the machines this application must run on, as local admin rights are locked down.
I'm definitely not afraid though of tinkering with the modules. There are no external dependencies I have to satisfy so it is my private playground to hack around as I like with.
How would I go about finding the exact changes needed at the Module level (or even as calls in my code) to address this issue? I've taken a good look around the Meta CPAN site but am none the wiser (all I can see is file permission and version bumps). I still want the application to run with 32 bit Office installs as well as 64 bit Office installs.
For my sins, I run a legacy Perl 5.24 install on which I have built an app of 15 years standing. Recently I have discovered that my Microsoft Outlook integration needed to send scheduled emails breaks on Windows boxes with 64 bit Office installs, while it runs fine with 32 bit Office installs.
The exact error thrown is:
No type library matching "Microsoft Outlook" found at ../Perl/lib/Mail/Outlook.pm line 111
While there do appear to be plenty of people who've encountered this issue, I do have some constraints which is why their solutions might not apply to my situation. First, I am unfortunately not open to upgrading my installation. Given enough time, I'd love to do that but there's never enough time, especially when there are tight deadlines! Second, I do not have the ability to directly manually tinker with the Registry settings on the machines this application must run on, as local admin rights are locked down.
I'm definitely not afraid though of tinkering with the modules. There are no external dependencies I have to satisfy so it is my private playground to hack around as I like with.
How would I go about finding the exact changes needed at the Module level (or even as calls in my code) to address this issue? I've taken a good look around the Meta CPAN site but am none the wiser (all I can see is file permission and version bumps). I still want the application to run with 32 bit Office installs as well as 64 bit Office installs.
Share Improve this question edited Mar 21 at 15:51 toolic 62.3k20 gold badges79 silver badges128 bronze badges asked Mar 21 at 15:48 v4169sgrv4169sgr 232 bronze badges 13- Perhaps you should include some code that demonstrates what you are trying to do, and what modules you are using. – TLP Commented Mar 21 at 16:05
- Try to run procmon.exe from SysInternals against your app to see where which calls are failing. I am 90% sure Perl does not find the expected registry keys when it probes for the COM registration entries. Outlook is an out-of-proc COM server and can be accessed from both 32 and 64 bit apps just fine, but I do not know how Perl handles the 32 vs 64 bit COM registry entries. – Dmitry Streblechenko Commented Mar 21 at 16:16
- @TLP My usage is very simple. I just instantiate Mail::Outlook objects to generate emails. Unfortunately I am not able to copy / paste here and am not really seeking to re-tool the way in which I achieve this outlook integration. Just something quick and simple would be fine. – v4169sgr Commented Mar 21 at 16:23
- @DmitryStreblechenko Sorry but I don't have access to those tools, but can see which calls are failing. The relevant information is in the question. – v4169sgr Commented Mar 21 at 16:24
- It is a free tool from Microsoft: learn.microsoft/en-us/sysinternals/downloads/procmon – Dmitry Streblechenko Commented Mar 21 at 16:58
2 Answers
Reset to default 2Check that you have HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{00062FFF-0000-0000-C000-000000000046}
registry key - note Wow6432Node
: since you app is 32 bit, it looks up in the 32 bit hive. Most likely you only have HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}.
You can either run the 64 bit version of Perl, or recreate the registry key in Wow6432Node.
Also note that Perl looks for a substring match when it enumerates all type libraries (yuck).
See if you can change that line to
use Win32::OLE::Const '{00062FFF-0000-0000-C000-000000000046}';
Just wanted to close this question by confirming that I have come to the conclusion that a major Perl version upgrade is the only way forwards. Registry editing is sadly not an option in this environment.
In the short term I can simply work around the integration failure using a switch I put there earlier for that purpose, but I agree with others, there really is no alternative. I should be doing this periodically anyway, but justifying the time required is always hard, especially now.