Calling dll's from perl 
Author Message
 Calling dll's from perl

Hi folks

The Win32::Api module provides a capability to load and call exported
functions from a DLL file.
I want to call a DLL that was produced with C#.

My questions are:

    - is it possible to do and how
    - in general how one knows what functions a DLL has available and what
their prototypes are ?

Thank you

        Yuri.



Tue, 22 Nov 2005 21:13:43 GMT  
 Calling dll's from perl


Quote:
> Hi folks

> The Win32::Api module provides a capability to load and call exported
> functions from a DLL file.
> I want to call a DLL that was produced with C#.

> My questions are:

>     - is it possible to do and how

Yes, there's no special requirement - except that the dll functions have to
use the _stdcall calling convention. If the dll wasn't built using this
convention then you won't be able to access the exported functions with
Win32::API.

Quote:
>     - in general how one knows what functions a DLL has available and what
> their prototypes are ?

The exported functions would be listed in the '.exp' file. To determine
their prototypes you would need to look at the source (or the
documentation).

If all you have is the actual dll (and no other files/documentation) then it
would be difficult to get the access you desire.

If you have any necessary header ('.h') files and the static lib ('.lib')
file other options would be to use Inline::C or to write an XS module. (You
would also need a C compiler.)

Cheers,
Rob



Wed, 23 Nov 2005 01:30:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling dll's from perl

2. Win32: Calling DLL's from Perl

3. Calling DLL's with Perl (NT/WIN95)

4. Calling DLL's from perl

5. Calls to dll's in Win95

6. Calling dll from perl

7. Calling dll functions using Perl Code

8. Calling a dll from a perl interface

9. Calling A DLL from Perl 5 ?

10. Calling win32 dlls from perl

11. Calling a dll from within perl

12. How to call ISAPI dll from perl?

 

 
Powered by phpBB® Forum Software