I read the docs and it states: > The bufptr parameter points to an array of LOCALGROUP_MEMBERS_INFO_2 > structures.
So what you really want to do here is to use the correct cast:
let currentPtr = cast[ptr
UncheckedArray[LPLOCALGROUP_MEMBERS_INFO_2]](bufptr)
Run
Which tells the compiler that the pointer points to an array of structures and
not a single element.
