Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Help - XS layer

by piyush.shourie (Beadle)
on Dec 23, 2004 at 10:27 UTC ( [id://417041]=perlquestion: print w/replies, xml ) Need Help??

piyush.shourie has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am writing the XS layer wherein I need to make some calls to the methods in a dll. All I am aware of is how to create XS layer if we have the C code.

However since I am using a third-party dll and dont have access to the C code, I need to make calls to the dll itself in my XS file.

Any pointers to invoking dll methods through XS layer will be of immense help.

Thanks,
Piyush

Replies are listed 'Best First'.
Re: Help - XS layer
by gellyfish (Monsignor) on Dec 23, 2004 at 11:56 UTC

    In some circumstances it might be easier to use the Win32::API module to access the functions in a DLL rather than creating an XS layer, however as long as you have the appropriate header files describing the interface then writing XS code to do access a DLL is no different than that for using a static C library.<?p>

    /J\

Re: Help - XS layer
by Anonymous Monk on Dec 23, 2004 at 10:41 UTC
    That is straight c/c++ programming
Re: Help - XS layer
by dpavlin (Friar) on Dec 24, 2004 at 12:12 UTC
    You might be interested in chromatic's P5NCI that allows you to use shared libraries from Perl without writing XS code. I had some luck with it, but my expirience is Unix-based. YMMV

    2share!2flame...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://417041]
Approved by gellyfish
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-07-18 13:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.