public static byte[] DebugGetSprites() { byte[] frameData = new byte[64 * 128 * 4]; GCHandle hFrameData = GCHandle.Alloc(frameData, GCHandleType.Pinned); try { InteropEmu.DebugGetSpritesWrapper(hFrameData.AddrOfPinnedObject()); } finally { hFrameData.Free(); } return(frameData); }