How to get binary data to callback function
Nikolaus Rath <[email protected]>
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
Hello, When I define a callback function with a prototype of ctypes.CFUNCTYPE(None, ctypes.c_char_p, ctypes.c_int) The function receives a true Python string. However, my data isn't actually \0 terminated, and I would like to call string_at(par1, par2) to get the binary data. But how do I get ctypes to pass the c_char_p object to my function, rather than the unwrapped string? Thanks, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ ctypes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ctypes-users