You're declaring pointer variables but never setting them to point to anything. You should just declare ordinary variables, and pass the addresses to the function.
constexpr maxpointers = 32;
UINT32 pointerCount = maxpointers;
POINTER_TOUCH_INFO pointerTouchInfo[maxpointers];
if (GetPointerFrameTouchInfo(pointerId, &pointerCount, pointerTouchInfo) == 0)
It's not necessary to use &
for pointerTouchInfo
; since it's an array, it automatically decays to a pointer when used as a function argument.