How to import a C# DLL using the ctypes module?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • afmfpt
    New Member
    • Jan 2010
    • 1

    How to import a C# DLL using the ctypes module?

    Hello,

    I've a C# DLL named SoundLogDLL.dll

    >>> from ctypes import *
    >>> x = cdll.LoadLibrar y("C:\\SoundLog \\SoundLogDLL.d ll")
    >>> x.run()
    I used this code to call the function run() from my dll but it gives this error:


    What do I need to do for the methods of my dll became visible in python?
  • Glenton
    Recognized Expert Contributor
    • Nov 2008
    • 391

    #2
    I've not used ctypes, but could it be something as simple as using x.SoundLog or whatever function you're trying to use?

    Comment

    Working...