ctypes - Serbipunk/notes GitHub Wiki

ctypes.CDLL(api_path)

string_at

str = string_at(ptr, int)

ctypes.string_at(address, size=- 1)

    This function returns the C string starting at memory address address as a bytes object. If size is specified, it is used as size, otherwise the string is assumed to be zero-terminated.

    Raises an [auditing event](https://docs.python.org/3/library/sys.html#auditing) ctypes.string_at with arguments address, size.

https://tentacles666.wordpress.com/2013/12/04/python-ctypes-efficiently-writing-binary-data/