I'm using DebugActiveProcess ( ) to debug a process. When there is an
unhandled exception I use the EXCEPTION_POINTERS structure from the debug
exception object and call GetThreadContext ( ) with the handle that I got
from the create thread event. I then call MiniDumpWriteDump write dump with
the parameters that I got from the debug events. And a process handle that I
open just prior to trying to create the dump with the following syntax
HANDLE hIProcess = OpenProcess ( PROCESS_ALL_ACCESS, FALSE, dwProcessID );
But MiniDumpWriteDump ( ) Returns with the error
ERROR_PARTIAL_COPY 299L
Do I need to set permissions on the process to read memory or should
DebugActiveProcess have done that?
Also the code that crashes is a little command line program that just
de-references a null pointer.
Ryan
Oleg Starodumov - 16 Oct 2003 14:46 GMT
Is the "crashing" thread in the "debuggee" started before
or after you attach to the process?
If it is started before you attach, check the thread ID
in the debuggee and make sure that you use the same
thread ID in the debugger to obtain the thread handle.
Also check that you set "ClientPointers" to FALSE
(in MINIDUMP_EXCEPTION_INFORMATION structure).
Regards,
Oleg
> I'm using DebugActiveProcess ( ) to debug a process. When there is an
> unhandled exception I use the EXCEPTION_POINTERS structure from the debug
[quoted text clipped - 15 lines]
>
> Ryan
Andy Pennell [MSFT] - 20 Oct 2003 22:50 GMT
Also try my article at
http://www.codeproject.com/debug/postmortemdebug_standalone1.asp

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.