in reply to Win32::API on 64 bits Windows Perl?

Is there a workaround, like a "thunking layer",

No. You cannot call 32-bit dlls from 64-bit code.

Or is there a module like Win32::API but for 64 bits

Not that I've found, but there could be.

The biggest problem is setting up the stack frames for the 64-bit calling convention without using a compiler.

In many ways, the 64-bit calling convention is much simpler than the (various) 32-bit calling conventions. For a start, there is only one of them, and all parameter types are passed as 64-bit entities, mostly in registers.

However, the removal of the _asm{} functionality from the 64-bit MSVC compiler means that you'd need a spot of MASM to facilitate the interfacing. Trouble is, the 64-bit MASM is extremely limited.

It might actually be easier done with gcc with its built in assembler facilities, but that assembler is just weird.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re: Win32::API on 64 bits Windows Perl?