Re: C to ctype conversion
"Diez B. Roggisch" <[email protected]> Thu, 30 Aug 2012 23:34:49 +0200
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
On Aug 30, 2012, at 1:50 AM, Uday Shah wrote:
> 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);
Bad google day?
http://bytes.com/topic/python/answers/689007-how-use-c-enum-python-ctypes
Diez
------------------------------------------------------------------------------
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/
_______________________________________________
ctypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ctypes-users