Esempio n. 1
0
 /// <summary>
 /// Used for dump Files Initialization
 /// </summary>
 /// <param name="cpuArchitecture"></param>
 /// <param name="systemInfo"></param>
 public void Init(CPUArchitecture cpuArchitecture, MiniDumpSystemInfo systemInfo)
 {
     CpuArchitecture = cpuArchitecture;
     SetWinVErsion(systemInfo.MajorVersion, systemInfo.MinorVersion);
 }
        /// <summary>
        /// Fetches System Info from the mapped dump file (using MINIDUMP_SYSTEM_INFO struct)
        /// </summary>
        /// <returns>System Info</returns>
        public MiniDumpSystemInfo GetSystemInfo()
        {
            MiniDumpSystemInfo result = null;
            MINIDUMP_SYSTEM_INFO systemInfo;
            IntPtr streamPointer;
            uint streamSize;

            bool readResult = SafeMemoryMappedViewStreamHandler.ReadStream<MINIDUMP_SYSTEM_INFO>(MINIDUMP_STREAM_TYPE.SystemInfoStream, out systemInfo, out streamPointer, out streamSize, _safeMemoryMappedViewHandle);

            if (readResult)
            {
                result = new MiniDumpSystemInfo(systemInfo);
            }

            return result;
        }