Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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:
Bottom Line: Win32::API is a great way to build a Windows based Perl solution without having to resort to an MS programming solution because "there's no module that does X". In reply to Win32::API by Guildenstern
|
|