On Wed, 16 Apr 2008, Christopher J. Madsen wrote: > > Does anybody have any idea what could cause this? It's impossible for > the DLL not to define INFINITE. It's no longer a conditional > compilation; if INFINITE is not defined, the code won't compile. > > The only thing I can think of is that $! isn't getting set properly, but > I don't know how that could happen.
Oops, just included this in a private message I sent to Chris: | Now that I'm typing this, I have one other idea though: if the module | links against a different runtime library than perl58.dll, then the | module will set errno inside the other runtime library and the value | of $! is unchanged inside Perl. One thing you could do to guard | against this is to set $! to 0 at the Perl level before calling | constant(). But you won't be able to detect that constant() didn't | recognize the name because you are returning a DWORD and not an SV*. Cheers, -Jan