in reply to Re^5: [OT - MS Visual Studio] How to build a dll that Win32::API can access
in thread [OT - MS Visual Studio] How to build a dll that Win32::API can access

its an Apparent bug in Win32::API if function returns a float or a double

Heh ... that's the post that started me thinking about this.

With floats, there may be an issue, but I don't think Win32::API should have any problems with doubles. At least, I don't think earlier versions did.

But then, when I try to build a dll using Visual Studio, I find that I can't even get the library files to behave in accordance with my expectations. Admittedly I don't use Visual Studio all that often.

I also don't use Win32::API very much (in fact I avoid it), but little issues like this keep gnawing away at me. Looks like I might have to spend a few hours on this. (My first thoughts were that it must just be a case of me doing something really stupid - which could yet prove to be the case.)

Thanks for the feedback.

Cheers,
Rob
Update: I'm getting very similar results if I change from doubles to ints - so I don't think it's just a doubles/floats issue. I'll see if anyone on the perl-win32-users list has any advice.
  • Comment on Re^6: [OT - MS Visual Studio] How to build a dll that Win32::API can access

Replies are listed 'Best First'.
Re^7: [OT - MS Visual Studio] How to build a dll that Win32::API can access
by BrowserUk (Patriarch) on May 25, 2008 at 05:22 UTC
      Have you tried reverting to 0.41?

      No - I've gone back to 0.20 (which used to work fine for me), and I've tried both 0.53 and 0.55. They're all behaving the same. If I build with __stdcall they can't find the "procedure". If I build with __declspec(dllexport) they segfault.

      It's starting to really annoy me - so I'll give up. (It just becomes yet another challenge that I've failed.) Thankfully, I personally have no need for either Win32::API or Visual Studio.

      Cheers,
      Rob