> -----Original Message----- > From: activeperl-boun...@listserv.activestate.com [mailto:activeperl- > boun...@listserv.activestate.com] On Behalf Of Francisco Zarabozo > Sent: 22 February 2012 18:21 > To: j...@activestate.com; Active State Perl Mailing List > Subject: Problem with Win32::OLE > > > Hello Jan! > > I thought about sending this question to the ActivePerl mailing list > but then I noticed you’re actually the author of Win32::OLE module, so, > although I’m still sending the message to the mailing list and I’ll > really appreciate any answer from other people here, I want to directly > ask you about this problem. > > I need to access some functionality of a C# assembly DLL. Such DLL can > be referenced in any .NET project but is not COM visible. So, I thought > about writting a new .NET project that references that DLL and makes > its methods COM visible. For that, I started by following the simple > example you can see on the following page to creating COM registered > assemblies: > > > http://generally.wordpress.com/2006/07/28/exposing-your-net-assembly- > through-com/ > > > It seems to have worked perfectly. I can access the new COM object from > the VB script they create there as a test. However, I can’t use > Win32::OLE to access it. By using the following code: > > > my $w = new Win32::OLE 'COMExample.Example'; print Win32::OLE- > >LastError(); > > > I get the following output: > > > Win32::OLE(0.1709) error 0x80070002: “The system cannot find the file > specified”. > > (note that is not about not finding the class in the system - when not > finding it it returns a different error) > > > I’m working on a Windows 7 Ultimate x64 machine, with Active Perl 5.12 > x64 > and Visual Studio Professional 2010 (using the “all CPUs” configuration > in > C#). > > Do you have any clue of what might be wrong here?
Did you look at Win32::Api? It might have been better way to go if you just wanted to call execute a function in a DLL. HTH -- Brian Raven Please consider the environment before printing this e-mail. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs