0

Is a Bash script able to load a DLL and call its functions? If so, how can this be done? Other scripting languages, such as Python and Perl are able to do this. How about Bash? There seems to be very little online about this.

In a testing environment scripts such as Python or Perl are used to automate the test process by calling API hooks that are publicly accessible via the application's DLL files. My team is implementing automated testing for our product. We already have Bash installed and are somewhat knowledgeable with it, but the question remains as to whether Bash can be used to call the public API functions buried in the application's DLL files.

Jim Fell
  • 13,750
  • 36
  • 127
  • 202
  • I believe the answer is yes though I don't know the details. Can you explain a bit better what you are ultimately trying to do? – Etan Reisner Jun 01 '15 at 18:20
  • @EtanReisner Hi Etan. I've updated my question with the details you requested. – Jim Fell Jun 01 '15 at 19:36
  • You are looking for something like python ctypes or some other ffi system whereby you can call native functions directly from the "host" language? – Etan Reisner Jun 01 '15 at 19:42

1 Answers1

0

Bash comes with support for loadable builtins - the examples/loadables directory in the source tree should be your starting point. The README file in that directory should have enough information to get started.

Toby Speight
  • 27,591
  • 48
  • 66
  • 103