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.

In reply to Re: Win32::API on 64 bits Windows Perl? by BrowserUk
in thread Win32::API on 64 bits Windows Perl? by bart

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.