473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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

1
Hello,

I've a C# DLL named SoundLogDLL.dll

>>> from ctypes import *
>>> x = cdll.LoadLibrary("C:\\SoundLog\\SoundLogDLL.dll")
>>> 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?
Jan 17 '10 #1
1 4987
Glenton
391 Expert 256MB
I've not used ctypes, but could it be something as simple as using x.SoundLog or whatever function you're trying to use?
Jan 24 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Sonia Rovner | last post by:
Hello, I'm using Python2.2.1 and Tcl/Tk 8.3 running on Win2000. I've been researching how to change the icon on the title bar and found that hackicon is the one I should pursue. However,...
3
by: Steven D. Arnold | last post by:
Hi, I'm on Mac OS X 10.2.6, using Python 2.3final. I would like to use the dl module to get access to some system calls, in particular kvm_getprocs. However, when I try to import dl at the...
6
by: wccppp | last post by:
Hello, I'm a complete newbie in learning python. I was testing some sample codes I found in this newsgroup and seems it could not locate the module ctypes.py. I installed python 2.4, wxPython...
12
by: p.lavarre | last post by:
Q: The C idea of (pv != NULL) is said most directly in Python ctypes how? A: We are of course supposed to write something like: def c_not_null(pv): return (ctypes.cast(pv,...
0
by: Oliver Andrich | last post by:
Hi everybody, I am currently playing around with ctypes and a C library (libWand from ImageMagick), and as I want to easily deploy it on Mac, Linux and Windows, I prefer a ctypes solution over a...
6
by: Mudcat | last post by:
Hi, I can't figure out why ctypes won't load the DLL I need to use. I've tried everything I can find (and the ctypes website is down at the moment). Here's what I've seen so far. I've added...
3
by: Andrew Lentvorski | last post by:
Basically, I'd like to use the ctypes module as a much more descriptive "struct" module. Is there a way to take a ctypes.Structure-based class and convert it to/from a binary string? Thanks,...
5
by: castironpi | last post by:
Hi all, I have a mmap and a data structure in it. I know the structure's location in the mmap and what structure it is. It has a ctypes definition. I want to initialize a ctypes object to...
2
by: Paul McNett | last post by:
Anyone have anything to suggest on this error: {{{ Traceback (most recent call last): File "shutter_studio.py", line 41, in <module> File "App.pyo", line 25, in <module> File...
14
by: Gordon Allott | last post by:
Hello :) The result of various incompatibilities has left me needing to somehow extract the address that a null pointer is pointing to with the null pointer being exposed to python via...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.