You might want to try the new Inline.pm. From reading the recent announcement for it in comp.lang.perl.announce, the author(s) really knew what they were doing. One thing it will give you is that you won't have to know which DLL a routine is in.

It provides what is probably the simplest possible interface for accessing C routines from Perl. You can use it in a script (in which case the script won't be able to run on a machine that doesn't have a C compiler and have Perl configure so that MakeMaker knows how to use it). Or you can use it to write modules. You can probably make a PPM for such a module (nearly?) the same way you would for any other module.

You can also look into the modules FFI and C::Dynalib, both of which appear to have a better design than Win32::API (as well as being portable to other platforms -- though that doesn't matter here) -- though I've never used either. I've used Win32::API enough to be frustrated with the design and the gotchas involved in getting it installed. But it is certainly powerful and I've used it successfully (before I'd heard of FFI and C::Dynalib). Now days I usually throw together a quick XS module instead of using any of these.

        - tye (but my friends call me "Tye")

In reply to Re: Anyone use Win32::API? by tye
in thread Anyone use Win32::API? by Guildenstern

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.