Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
ctypes: how to make a structure pointer to point to a buffer
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Guest, post: 2868332"] first, I'm try the POINTER to convesion the pointer type. but failed. class STUDENT(Structure): _fields_ = [('name', c_int), ('id', c_int), ('addition', c_ubyte)] buffer = c_byte * 1024 student_p = cast(buffer, POINTER(STUDENT)) The parameter of the POINTER must be ctypes type. How could I attach the buffer pointer to the structure STUDENT ? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
ctypes: how to make a structure pointer to point to a buffer
Top