{"id":21348416,"url":"https://github.com/ex-exe/windowsdumpwriter","last_synced_at":"2025-07-18T16:38:24.327Z","repository":{"id":179637984,"uuid":"663842148","full_name":"EX-EXE/WindowsDumpWriter","owner":"EX-EXE","description":"Library function that output dump on Windows.","archived":false,"fork":false,"pushed_at":"2023-11-19T00:55:40.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T22:45:47.756Z","etag":null,"topics":["csharp","dump","library","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EX-EXE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-08T08:38:14.000Z","updated_at":"2023-08-29T12:27:42.000Z","dependencies_parsed_at":"2023-11-19T01:34:38.668Z","dependency_job_id":null,"html_url":"https://github.com/EX-EXE/WindowsDumpWriter","commit_stats":null,"previous_names":["ex-exe/windowsdumpwriter"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/EX-EXE/WindowsDumpWriter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EX-EXE%2FWindowsDumpWriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EX-EXE%2FWindowsDumpWriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EX-EXE%2FWindowsDumpWriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EX-EXE%2FWindowsDumpWriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EX-EXE","download_url":"https://codeload.github.com/EX-EXE/WindowsDumpWriter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EX-EXE%2FWindowsDumpWriter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265592309,"owners_count":23794127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dump","library","windows"],"created_at":"2024-11-22T02:20:51.365Z","updated_at":"2025-07-18T16:38:24.302Z","avatar_url":"https://github.com/EX-EXE.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NuGet version](https://badge.fury.io/nu/WindowsDumpWriter.svg)](https://badge.fury.io/nu/WindowsDumpWriter)\n# WindowsDumpWriter\nLibrary function that output dump on Windows.\n\n# Library Usage\nPM\u003e Install-Package [WindowsDumpWriter](https://www.nuget.org/packages/WindowsDumpWriter/)\n```\nvar result = WindowsDumpWriter.Write(\n    outputFilePath,\n    dumpType,\n    processId,\n    threadId,\n    address);\n```\n\n# App Usage\n## CommandLine Example\n```\nWindowsDumpWriter.exe --Output \"./MiniDump.dmp\" --DumpType 6182 --ProcessId 39520\n```\n```\nWindowsDumpWriter.exe --Output \"./MiniDump.dmp\" --DumpType 6182 --ProcessId 39520 --ThreadId 46800 --ExceptionAddress 0x000000FD0E4FEBE0\n```\n| Param | Description |\n|---|---|\n| --Output | Output dump file path. |\n| --DumpType | DumpType |\n| --ProcessId | Dump process id. |\n| --ThreadId | ThreadId in exception info. |\n| --ExceptionAddress | ExceptionAddress in exception info. |\n\n## VC++ Example\n```cpp\n#include \u003cwindows.h\u003e\n#include \u003cdbghelp.h\u003e\n#include \u003cthread\u003e\n\nint GenerateDump(EXCEPTION_POINTERS* exceptionPtr)\n{\n\tconst DWORD processId = GetCurrentProcessId();\n\tconst DWORD threadId = GetCurrentThreadId();\n\n\t// Create ProcessInfo\n\tSTARTUPINFO startupInfo;\n\tPROCESS_INFORMATION processInfo;\n\tZeroMemory(\u0026startupInfo, sizeof(startupInfo));\n\tZeroMemory(\u0026processInfo, sizeof(processInfo));\n\tstartupInfo.cb = sizeof(startupInfo);\n\n\t// Cmd\n\tstatic constexpr int bufferSize = 4096;\n\tWCHAR cmd[bufferSize];\n\tconst int dumpType = MiniDumpWithFullMemory | MiniDumpWithHandleData | MiniDumpWithUnloadedModules | MiniDumpWithFullMemoryInfo | MiniDumpWithThreadInfo;\n\tswprintf(cmd, \n\t\tbufferSize,\n\t\tL\"\\\"%s\\\" --Output \\\"%s\\\" --DumpType %d --ProcessId %d --ThreadId %d --ExceptionAddress 0x%p\",\n\t\tL\"./WindowsDumpWriter.exe\",\n\t\tL\"./MiniDump.dmp\",\n\t\tdumpType,\n\t\tprocessId,\n\t\tthreadId,\n\t\texceptionPtr);\n\n\t// Process\n\tif (CreateProcess(\n\t\tnullptr,\n\t\tcmd,\n\t\tnullptr,\n\t\tnullptr,\n\t\tfalse,\n\t\t0,\n\t\tnullptr,\n\t\tnullptr,\n\t\t\u0026startupInfo,\n\t\t\u0026processInfo))\n\t{\n\t\t// Wait Process\n\t\tWaitForSingleObject(processInfo.hProcess, INFINITE);\n\n\t\t// Exit Code\n\t\tunsigned long exitCode;\n\t\tGetExitCodeProcess(processInfo.hProcess, \u0026exitCode);\n\n\t\t// Close Handle\n\t\tCloseHandle(processInfo.hProcess);\n\t\tCloseHandle(processInfo.hThread);\n\t}\n\treturn EXCEPTION_EXECUTE_HANDLER;\n}\n\nint main()\n{\n\tstd::thread thread([\u0026]\n\t\t{\n\t\t\t__try\n\t\t\t{\n\t\t\t\t// Exception Code\n\t\t\t\tint* ptr = nullptr;\n\t\t\t\t*ptr = 0;\n\t\t\t}\n\t\t\t__except (GenerateDump(GetExceptionInformation()))\n\t\t\t{\n\t\t\t}\n\t\t});\n\tthread.join();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fex-exe%2Fwindowsdumpwriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fex-exe%2Fwindowsdumpwriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fex-exe%2Fwindowsdumpwriter/lists"}