Re: C to ctype conversion
Uday Shah <[email protected]> Wed, 29 Aug 2012 16:50:46 -0700
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <CAFLCvTKCQATWtZHKdqHThmUdp=CjX=3SWdOC_iNM8gPQbbk=xA@mail.gmail.com> |
I have the following enum set and C function below. I was wondering
how do I convert this to the ctype. How do I convert the C function
argument to ctype python argument especially for the custom datatype.
typedef enum hwRegs_t
{
sample1, // 0x00
sample2, // 0x01
sample3, // 0x02
sample4, // 0x03
sample5, // 0x04
sample6, // 0x05
HW_REGS_COUNT
} hwRegs;
void DLL_ENTRY hwRead( hwRegs hwRegister, uchar *pData);
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/