I have decided to add import table hook/patching to 
http://search.cpan.org/~bulkdd/Win32-API-0.70_02/Callback.pm . The technique is 
old (an example http://sandsprite.com/CodeStuff/Understanding_imports.html ), 
but has never been available to Perl Code before. Import table hooking  allows 
a user to use Win32::API::Callback callbacks to intercept the function call 
from   DLL (shared library) (the importer) to another DLL (the exporter), on 
the importer side. This will allow a syscall/OS call to be hooked using Perl 
and Perl code is used to implement the original C function call, or intercept 
and modify the arguments and return value from the caller to the callee 
function. The hooking is done, and undone on demand during runtime. Most 
people's, or atleast my typical usage of the feature, callstack wise will be,

OS process start->runops/Perl code in Perl->XS or Perl Core call to imported C 
function or syscall->Win32::API::Callback::IATPatch patch to import table of XS 
lib or perl core interp->Win32::API::Callback's C/Asm code->runops/Perl sub in 
Perl->Win32::API->original imported function

I thought of the name Win32::API::Callback::IATPatch. 
Win32::API::Callback::IATPatch is package/class name, but not a separate PM 
file.  Win32::API::Callback::IATPatch is implemented entirely in 
Win32:::API::Callback's XS code. Does anyone have anything against this name or 
a better suggestion?

Other names I though of are Win32:::API::Callback::ImportPatch, 
Win32:::API::Callback::Patch, Win32::API::Callback::Hook, and 
Win32::API::Callback::Intercept.
                                          

Reply via email to