Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Debugging / October 2003

Tip: Looking for answers? Try searching our database.

MiniDumpWriteDump From DebugActiveProcess

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ryan - 15 Oct 2003 18:11 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.