On 05/10/2012 12:12, bulk 88 wrote:

Read my post from the other day. Win32::API can already do this with some 
runtime package namespace messing. http://perlmonks.org/?node_id=969555 I 
highly suggest you write an XS library though. C or C++ for your COM code.

I was thinking to add the functionality to API without the messing
around part by the user since everything is already there in API to
support it.

Basically it would be identical to the current logic except that the
DLL would be a special name (like 'NONE' - implying that the DLL is
already loaded by another function) and then just using the address
that would be supplied by the caller and bypassing the DLL lookup
of the routine.  The only non-obvious part is how to pass the address
to the API module (syntax-wise) - maybe just an extra argument when
the DLL is 'NONE' that contains the address of the function.  Or
possibly the DLL could be a ref to the address and no additional
args would be needed - just check for a ref and de-ref and use it.

Sounds like it would be easier to imp. than the callback logic.
The idea is to not have to write any XS code to do it - just use
what we have in API.

Reply via email to