That worked. Many thanks Eryk.
Rob
On 30/06/2022 23:45, Eryk Sun wrote:
On 6/30/22, Rob Cliffe via Python-list wrote:
AKAIK it is not possible to give ctypes a bytearray object and persuade
it to give you a pointer to the actual array data, suitable for passing
to a DLL.
You're overlooking t
Il giorno venerdì 1 luglio 2022 alle 00:46:13 UTC+2 ery...@gmail.com ha scritto:
> On 6/30/22, Rob Cliffe via Python-list wrote:
> >
> > AKAIK it is not possible to give ctypes a bytearray object and persuade
> > it to give you a pointer to the actual array data, suitable for passing
> > to a
On 6/30/22, Rob Cliffe via Python-list wrote:
>
> AKAIK it is not possible to give ctypes a bytearray object and persuade
> it to give you a pointer to the actual array data, suitable for passing
> to a DLL.
You're overlooking the from_buffer() method. For example:
>>> ba = bytearray(10)