Ejemplo n.º 1
0
        private static void ProcessTheParameters(int processId, string dumpFolder, bool isFull)
        {
            Process p = Process.GetProcessById(processId);

            DumpFolder = dumpFolder;
            string     dumpFile = Path.Combine(dumpFolder, DateTime.Now.ToString(DumpConstants.DATETYPEDefault) + ".dump");
            FileStream fs       = new FileStream(dumpFile, FileMode.Create, FileAccess.Write);

            DumpConstants.MINIDUMP_TYPE dumpType   = isFull ? DumpConstants.MINIDUMP_TYPE.MiniDumpWithFullMemory : DumpConstants.MINIDUMP_TYPE.MiniDumpNormal;
            DumpConstants.SYSTEM_INFO   systemInfo = new DumpConstants.SYSTEM_INFO();
            kernel32.GetSystemInfo(ref systemInfo);
            CreateMiniDump(p, fs, systemInfo.wProcessorArchitecture == 9, dumpType);
        }
Ejemplo n.º 2
0
 public static extern void GetSystemInfo(ref DumpConstants.SYSTEM_INFO cpuinfo);