Skip to content
The Perl Win32 API Import Facility
Perl C++ C XS Assembly Makefile Perl6
Pull request Compare This branch is 29 commits ahead of cosimo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Callback
api-test
patches
samples
t
.gitignore
API.h
API.pm
API.xs
API_test.dll add WCHAR functions to API_test.dll Sep 29, 2015
API_test64.dll
Call.c
Callback.pm
Changes
IATPatch.pod
MANIFEST
MANIFEST.SKIP
META.yml
Makefile.PL
README
Struct.pm
TODO
TYPEMAP
Type.pm
W32ATest.pm
call_asm_x64_gnu.s
call_asm_x64_msvc.asm
call_asm_x86_gnu.s
call_asm_x86_msvc.asm
call_i686.c
call_i686.h
call_x86_64.h
ppport.h
rtc.dll
rtc64.dll
typemap56

README

Win32::API - Perl Win32 API Import Facility
===========================================

Current maintainer: Cosimo Streppone <cosimo@cpan.org>
Original author:    Aldo Calpini <dada@perl.it>

With this module you can import and call arbitrary functions
from Win32's Dynamic Link Libraries (DLL), without having
to write an XS extension.

Note, however, that this module can't really do everything:
parameters input and output is limited to simpler cases.
In particular, when you play hard with pointers and arrays
and memory locations, there are some things that you just
can't do.

The current version of Win32::API is available at:

  http://search.cpan.org/dist/Win32-API/

Here it is a short example of how you can use this module.
It just gets the PID of the current process, eg. same as Perl's
internal $$:

  use Win32::API;
  Win32::API->Import("kernel32", "int GetCurrentProcessId()");
  $PID = GetCurrentProcessId();

Full documentation is available in POD format inside API.pm.

The possibilities are nearly infinite (but not all are good :-).
Enjoy it.
Something went wrong with that request. Please try again.