all groups > visual studio .net ide > march 2004 >
You're in the

visual studio .net ide

group:

Debugging with & without the Automation model


Debugging with & without the Automation model mbosticky NO[at]SPAM aimltd.co.uk
3/29/2004 1:11:06 PM
visual studio .net ide:
Hi all

I am trying to use the Debugger object in the VS automation model to
analyse some data in a generic way. Unfortunatelly i have discovered
that the Debugger method GetExpression() can be very slow if you want
to analyse a lot of data. I considered the Windows API function
ReadProcessMemory() to achieve the same effect which i would expect to
be much faster. But ReadProcessMemory() requires a handle to the
process you are debugging. I can not see how i could get such a handle
from the Automation model. Any tips on making the GetExpression()
fast? Any way to get a process handle? The automation model provides
process ID but i don't know how to get the process handle from it.

Many thanks up front, Martin.
RE: Debugging with & without the Automation model robgruen NO[at]SPAM online.microsoft.com
4/2/2004 3:46:19 PM
Martin,

There's not much you can do to GetExpression to run faster...think of it as
someone handing you a M&M with your eyes closed and determining what color
it is. You'll have to do a bit of guessing before you get it right....If
you can gurantee to guess the color of the M&M on the 1st try everytime let
us know...we'll give you a job working on GetExpression! ;) j/k.

To get a handle to the current process you'll want to call the OpenProcess
API. Hope that helps.

Thanks! Robert Gruen
Microsoft, VB.NET

This posting is provided "AS IS", with no warranties, and confers no rights.
Re: Debugging with & without the Automation model mbosticky NO[at]SPAM aimltd.co.uk
4/10/2004 3:56:04 PM
Thanks Robert

I didn't know that i could open a process once it was already opened.
This definitely helped me a lot. I have considered applying at
Microsoft actually but unfortunately I do not possess psychic
abilities.

AddThis Social Bookmark Button