Hi,
I've just started using ctypes and so far, its great. But I'm running
to some problems with complex datatypes. I'm not sure how to wrap
something like this:
/* This defines the Handle type in a header file. I don't think
this needs wrapping, its just to show the handle definition for
context*/
typedef struct DFFTSHandle_s *DFFTSHANDLE;
....
/* Then, the handle is used like this later on. This *is* what I
want to wrap.*/
status = DFFTSCreateSession(&Handle);
status = DFFTSSetSessionOption(Handle, DFFTSOPT_ITERATIONS,
&iteration, sizeof(iteration));
Any ideas? 2 1646
On Tue, 16 Oct 2007 06:47:06 -0700, gamename wrote:
I've just started using ctypes and so far, its great. But I'm running
to some problems with complex datatypes. I'm not sure how to wrap
something like this:
/* This defines the Handle type in a header file. I don't think
this needs wrapping, its just to show the handle definition for
context*/
typedef struct DFFTSHandle_s *DFFTSHANDLE;
...
/* Then, the handle is used like this later on. This *is* what I
want to wrap.*/
status = DFFTSCreateSession(&Handle);
status = DFFTSSetSessionOption(Handle, DFFTSOPT_ITERATIONS,
&iteration, sizeof(iteration));
If this "handle" is always just treated as a pointer to an opaque data
structure you may just use a void pointer.
Ciao,
Marc 'BlackJack' Rintsch
On Oct 16, 6:52 am, Marc 'BlackJack' Rintsch <bj_...@gmx.netwrote:
On Tue, 16 Oct 2007 06:47:06 -0700, gamename wrote:
I've just started using ctypes and so far, its great. But I'm running
to some problems with complex datatypes. I'm not sure how to wrap
something like this:
/* This defines the Handle type in a header file. I don't think
this needs wrapping, its just to show the handle definition for
context*/
typedef struct DFFTSHandle_s *DFFTSHANDLE;
...
/* Then, the handle is used like this later on. This *is* what I
want to wrap.*/
status = DFFTSCreateSession(&Handle);
status = DFFTSSetSessionOption(Handle, DFFTSOPT_ITERATIONS,
&iteration, sizeof(iteration));
If this "handle" is always just treated as a pointer to an opaque data
structure you may just use a void pointer.
Ciao,
Marc 'BlackJack' Rintsch
OK. Thanks.
-T This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Thomas Heller |
last post by:
It's release day ;-)
ctypes 0.6.3 released
=====================
Overview
'ctypes' is a Python package to create and manipulate C data types
in Python, and to call functions in dynamic...
|
by: Thomas Heller |
last post by:
ctypes 0.9.2 released - Oct 28, 2004
====================================
Overview
ctypes is a ffi (Foreign Function Interface) package for Python
2.3 and higher.
ctypes allows to call...
|
by: aaa |
last post by:
I am having trouble getting a complex data type to get passed to a non-COM
dll's function by ref and return back data from that object. Simple data
types work fine but when I try the complex data...
|
by: Martin P. Hellwig |
last post by:
Hey all,
I'd like to wrap libpam so that I can use that for authentication and
password management. I build ctypes (0.9.9.6) on my platform via ports.
Now according to OpenPAM documentation...
|
by: Oliver Andrich |
last post by:
Hi,
hopefully someone with some ctypes experience can help me. I guess
this is a trivial task again, but I have been googling, reading,
experimenting the whole afternoon without any success.
...
|
by: sjdevnull |
last post by:
Hey,
I'm trying to wrap GNU readline with ctypes (the Python readline
library doesn't support the callback interface), but I can't figure out
how to set values to a variable inside the library. ...
|
by: Chris AtLee |
last post by:
Sorry for the repeat post...I'm not sure if my first post (on May
30th) went through or
not.
I've been trying to write a PAM module using ctypes. In the
conversation
function (my_conv in the...
|
by: Eugen Wintersberger |
last post by:
Hi there
I want to use ctypes in connection with C functions that use complex
datatypes defined in the C99 standard. Does someone know a simple way
how to implement this? Are there any plans to...
|
by: gamename |
last post by:
Hi,
I've just started using ctypes and so far, its great. But I'm running
to some problems with complex datatypes. I'm not sure how to wrap
something like this:
/* This defines the Handle...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |