I'm wanting to use MiniDumpWriteDump to generate crash logs for an application of mine. Microsoft recommends performing the dump from another process, which is what I'm trying to do. The issue I'm having is with passing the PEXCEPTION_INFORMATION
structure from the parent to the child process. The issue is that the parent process owns the memory for this structure, and I need to give it to the child. I found this post
How do I get at the exception information when using MiniDumpWriteDump out-of-process?
And the accepted answer said "It doesn't matter that the pointer is not valid in the context of the watchdog process." which lead me to believe I could simply pass the PEXCEPTION_INFORMATION
pointer that my unhandled exception filter receives to the child process, and windows would read it from the parent. This isn't happening and so I don't really know what to do, at the moment the child process crashes, presumably because windows tries to access this memory as-if it belonged to the child. I'm obviously missing something here, but I'm not sure what. I use pipes to send data to the child process, and the answer to the above question says using memory mapped files works, but I'm not really sure why, or if I'm understanding the answer correctly.