示例#1
0
        public static ErrorMessage GetMessage(IntPtr nativeChunkMsg)
        {
            NativeErrorMessage msg     = Marshal.PtrToStructure <NativeErrorMessage>(nativeChunkMsg);
            ErrorMessage       message = new ErrorMessage(msg);

            return(message);
        }
示例#2
0
 private ErrorMessage(NativeErrorMessage nativeMsg)
 {
     Tag        = nativeMsg.Tag;
     Message    = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.MessagePtr);
     Function   = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.FunctionPtr);
     File       = (string)UTF8StringMarshaler.GetInstance("").MarshalNativeToManaged(nativeMsg.FilePtr);
     LineNumber = nativeMsg.LineNumber;
 }