Example #1
0
        private static unsafe void WriteExceptionHeader(byte[] buffer, uint pos, ExceptionHeader header)
        {
            fixed(byte *p = buffer)
            {
                ExceptionHeader *ptr = (ExceptionHeader *)(p + pos);

                *ptr = header;
            }
        }
Example #2
0
        private static unsafe ExceptionHeader ReadExceptionHeader(byte[] buffer, uint pos)
        {
            ExceptionHeader exceptionHeader = new ExceptionHeader();

            fixed(byte *p = buffer)
            {
                ExceptionHeader *ptr = (ExceptionHeader *)(p + pos);

                exceptionHeader = *ptr;
            }

            return(exceptionHeader);
        }