Win32::API provides a Perlish means of calling functions from Win32's Dynamic Link Libraries. It's an interface with the Win32 API, as its name suggests.

So armed with that tool, the question changes. Now you know how to deal with the Windows API from Perl. At this point rather than asking how to do it with Perl, you can ask how to clear the print queue using the Windows API. It turns out there are a lot more people who know how to manipulate the Windows API than there are who know both the Windows API and Perl. So by using Win32::API, you get to abstract away the details of how to accomplish a task in Perl, and re-focus on how to accomplish the task irrespective of the language used to implement the solution.

And if you do get stuck on the Perl side of things, you'll be able to ask a question about Win32::API instead of about the specific API-manipulation objective. Once again, this type of generalization benefits you, since there are more people who understand the Win32::API module than there are who have specific experience with manipulating the print queue from Perl.

In this way your question which at the outset seems too localized to be answered by any more than a few individuals can be broken into two questions, each of which can be answered by thousands of individuals even if there's no intersection between those two groups.


Dave


In reply to Re: clear print queue by davido
in thread clear print queue by Anonymous Monk

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.