win32gui.PyMakeBuffer

object = PyMakeBuffer(len, addr )

Returns a buffer object from addr,len or just len

Parameters

len : int

length of the buffer object

addr : int

Address of the memory to reference. If zero or not specified, a new buffer object is created with the specified size.

To Do

We should consider deprecating and dropping the behaviour when the address is zero - it leads to unexpected bugs, as passing NULL appears to return a reference to what was valid memory.