Re: functions with: char & type of parameters
Mads Kiilerich <[email protected]>
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
Pavel Nikitenko wrote, On 05/18/2010 05:09 PM: > I am trying to call following C function from Windows DLL from Python > with ctypes. > > int __stdcall BBBOUNCECHECK( char&strMessage, > char&strAddressOut, > int&lAddressLenOut, > char&strEmailIgnoreList, > char&strKey > ); > AFAICS That is C++, not C. ctypes makes C interfacing simple, but C++ is a lot harder (read: hardly feasible). Some work was done on http://code.google.com/p/ctypes-stuff/source/browse/#svn/trunk/ctypes-cpp , but AFAIK it hasn't been finished. There might however be a simple hack that works for reference parameters in your case - I don't know. I would consider creating a simple C wrapper for this. But if you have to use a cimpiler anyway then why not use one of the other methods for creating python extensions? See for example Roman Yakovenkos site http://language-binding.net/ . /Mads ------------------------------------------------------------------------------