I have a buffer like:
bufstr = ctypes.create_string_buffer("Test", 32)
How I obtain the address of that buffer? i.e. the one displayed if I do:
print bufstr
like:
<ctypes.c_char_Array_32 object at 0x042ACAD0>
I know I can pass it with byref(), for example; but what if I just want to get that address (aside from slicing that string!)?
Thanks!
Use ctypes.addressof.