0

I had a dll written in C. So for a C# application, I wrote a .cs wrapper that worked in calling the dll functions..

Now I have a C# dll and need to call the functions using python 3.4 (LoadLibrary). What would be the preferred route of doing this

1) convert the C# dll code into C and make a new c-style dll (with exports).
2) Create some kind of wrapper in python that allows it to see the C# dll functions as-is? ( if possible) 3) Both Python for .Net and IronPython don't seem to be actively maintained anymore (The windows installer shows python 2.7). Is there a better alternative?

ben
  • 473
  • 2
  • 9
  • 21

1 Answers1

0

Take a look at this question on stack overflow.It tells how to use ctypes.It describes the ctypes.WinDLL command for including the required dll.You can set up prototype and parameters for the desired function call using ctypes.WINFUNCTYPE.

Community
  • 1
  • 1
avinash pandey
  • 1,321
  • 2
  • 11
  • 15