> var currentPtr = 
> cast[LPLOCALGROUP_MEMBERS_INFO_2](https://forum.nim-lang.org/bufptr)

On that line you declare that currentPtr is of type 
`LPLOCALGROUP_MEMBERS_INFO_2` through (unsafe) casting. If you want to use the 
`[]` operator on the type it needs to be defined.

If you want a pointer to multiple element of the type you should use `ptr 
UncheckedArray[T]` instead of `ptr T`.

Reply via email to