Ben Morrow said:
But what would be the point of that? The point is to write Perl

.
Note you could probably make mingw work with some effort... and you can
precompile the module. I would probably *not* use Inline, but just write
an XS module in C++ if I was going down that route.
Yeah - I just wanted to make the OP aware of the Inline::CPP module as an
option - but I didn't want to take the time to get too involved in providing
details, given that I didn't even know if the OP was prepared to go down
that route.
As to whether you use Inline or you write the XS module yourself, it boils
down to whether you want Inline to write the XS code for you ... or whether
you .... ummm .... want to write the XS code yourself. (I'd be using Inline
as I'm not all that proficient in writing XS code.) One advantage with
Inline is that running/debugging/fixing the functions as you develop them is
easy. One disadvantage with Inline is that, when it comes to converting that
script to a module there are some (fairly easily negotiated) hoops to jump
through.
That is correct insofar as calling Win32 APIs (or: C functions in DLLs
with the __stdcall calling convention) goes: the Win32::API
instantiation process does the LoadLibrary for you. However, you can't
call C++ member functions at all, so you can't translate that code.
Oh .... bummer. Wasn't aware of that - thanks for correcting. (I try to
avoid Win32::API - usually go the XS route.) Is there some C-style way of
accessing those member functions with Win32::API ? Or does "you can't
translate the code" really *mean* "you can't translate the code"
Cheers,
Rob