There's more than one way to do things | |
PerlMonks |
Item Description: Allows use of many Win32 API calls
Review Synopsis: Great for using that one function that hasn't been CPAN'ed yet.
Every now and then I find a need to call a function that would be second nature if I were using Visual C++ in a Windows environment. I happened across Win32::API, and was very pleasantly surprised at what the module can do.
Win32::API allows functions to be imported from Windows DLL files. It also makes the job much easier by making the actual calling of the function incredibly simple. No more trying to do weird type conversions and stupid pointer tricks - just pack your variables and call the function. If the function doesn't take a structure as a parameter, it's even easier - just call it like a normal Perl sub.
I've had great success at using it, and while I haven't benchmarked any results it appears to be quite fast. Coding the function call is simple, also. It takes longer to research the function and its parameters than it does to write the call.
Drawbacks: There are two drawbacks to Win32::API that I've noticed so far. One could be easily remedied, while the other is probably not something I should hold my breath for. Here they are:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Win32::API
by dada (Chaplain) on Jul 15, 2002 at 09:57 UTC | |
by dada (Chaplain) on Mar 07, 2003 at 14:17 UTC | |
by SyN/AcK (Scribe) on Jul 16, 2003 at 04:13 UTC | |
by neauva (Initiate) on Aug 19, 2003 at 22:01 UTC | |
by BrowserUk (Patriarch) on Aug 20, 2003 at 00:09 UTC | |
Re: Win32::API
by Sniper (Scribe) on Aug 13, 2001 at 00:16 UTC | |
by Anonymous Monk on Sep 21, 2007 at 06:59 UTC | |
by Anonymous Monk on Sep 21, 2007 at 07:04 UTC | |
by Corion (Patriarch) on Sep 21, 2007 at 07:27 UTC | |
by Anonymous Monk on Sep 21, 2007 at 07:32 UTC |