ctypes listing dll functions

marc.wyburn at googlemail.com marc.wyburn at googlemail.com
Fri Sep 8 07:29:25 EDT 2006


hi all and before I start I apologise if I have this completely muddled
up but here goes.

I'm trying to call functions from a dll file in a python script but I
can't work out what functions are available. I'm using ctypes.  I've
tried using dir(ctypes_object) but the resultant output looks like a
list of standard functions and not the ones I'm looking for.

Also how can I tell if the dll was written in C or C++ as I understand
C++ dlls can't be used.

I have a header file that starts;

#ifndef __DIRAC__
#define __DIRAC__


    // Prototypes

    const char *DiracVersion(void);
    void *DiracCreate(long lambda, long quality, long numChannels,
float sampleRate, long (*readFromChannelsCallback)(float **data, long
numFrames, void *userData));
    void *DiracCreate(long lambda, long quality, long numChannels,
float sampleRate, long (*readFromChannelsCallback)(float *data, long
numFrames, void *userData));
    long DiracSetProperty(long selector, long double value, void
*dirac);
    long double DiracGetProperty(long selector, void *dirac);
    void DiracReset(bool clear, void *dirac);
    long DiracProcess(float **audioOut, long numFrames, void *userData,
void *dirac);
    long DiracProcess(float *audioOut, long numFrames, void *userData,
void *dirac);
    void DiracDestroy(void *dirac);
    long DiracGetInputBufferSizeInFrames(void *dirac);

I would have thought that DiracCreate, DiracSetProperty etc were all
callable functions.  As you may have guessed I'm don't do much work in
C...

Thanks, MW.




More information about the Python-list mailing list