I have one multi-dimensional array which contains binary data as [3,240]:
byte[,] bData = (byte[,])objTran; // bdata is binary data with [3,240]
which means it has 3 records each from 0,239 and 1,239 and 2,239. Now I am Marshalling this data to copy in TRANSACTIONLOGINFO structure:
GCHandle handle = GCHandle.Alloc(bData, GCHandleType.Pinned);
TRANSACTIONLOGINFO ObjTranInfo = (TRANSACTIONLOGINFO)Marshal.PtrToStructure(
handle.AddrOfPinnedObject(), typeof(TRANSACTIONLOGINFO));
handle.Free();
But every time ObjTranInfo
shows only the first data details. How can I convert the multi-dimensional array to a single-dimensional array and pass to GCHandle
to get each data one by one?