Mail Archives: cygwin/2000/05/08/08:46:53
I'm use Cygwin, Perl and the Win32::OLE Perl module to interact with
COM objects. And, of course, the Win32::OLE DLL is compiled with
-fvtable-thunks. For the most part everything works just fine
(and as of Cygwin 1.1.0, Perl 5.6.0 and Win32::OLE 0.12 build
right out the box).
However, the extra DCOM functions like CoCreateInstanceEx are
implemented in the Win32::OLE Perl module by dynamically looking up
functions, LoadLibrary("OLE32") GetProcAddress("CoCreateInstanceEx"),
and calling through the function pointers. However, this fails
when Perl is compiled with -O2 or -O. Note that the Win32::OLE module
is dynamically loaded into Perl and the problem is triggered
when the separate Perl DLL has been built with the optimizer.
There are a couple of work-arounds. Things are fine if Perl
is built with just -g! Also, If I change the function pointer
to just a normal function call, it works too. The failure with
function pointers and -O2 manifests itself as a stack corruption.
I know there are some limitations with COM support, but this
seems particularly strange because it depends on whether the
optimizer is used by a separate DLL.
Any idea what's going on here?
Thanks,
Eric Fifer
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -