I was unable to do this, but this might get you in the right area, I assume this is for Windows, if not, sorry.
Try the
Win32::API module, and I belive the Win32 API call is
GetDC() in
user32.dll. The quick test script I ran segfaulted perl, so I doubt this will work, but I just put 5 minutes into looking, and trying it out, this will at least point you in the right direction.
Just so you see my test script (which might be wrong with the Win32 API call, since I've never used this module):
use Win32::API;
my $screenshot = new Win32::API("user32", "GetDC", '', 'N');
my $shot = $screenshot->Call();
Update It appears there is also another GetDC in Windows land that is dealing with Getting the Domain Controler, unlike this one, which is Device Control, or something like that. Hope this helps.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.