Quote Originally Posted by michaelerice
Try moving gcInfo.Free() to after your call to ReadProcessMemory. Also, why use Len(bInfo) instead of bInfoSize in your ReadProcessMemory call?
Tried moving free afterwards and same behaviour. Returns -1 and bInfo is still all zero's.

I tried len(bInfo) just to compare whether it returned same size as marshal.sizeof, it does and I just forgot to change it back.