Click here to Skip to main content
15,910,886 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: parallel processing Pin
Luc Pattyn12-Mar-10 9:19
sitebuilderLuc Pattyn12-Mar-10 9:19 
Question[vb.net 2008] How get mp3 title,author and lenght ? Pin
nRush11-Mar-10 21:52
nRush11-Mar-10 21:52 
AnswerRe: [vb.net 2008] How get mp3 title,author and lenght ? Pin
Giorgi Dalakishvili11-Mar-10 22:14
mentorGiorgi Dalakishvili11-Mar-10 22:14 
GeneralRe: [vb.net 2008] How get mp3 title,author and lenght ? Pin
nRush11-Mar-10 23:30
nRush11-Mar-10 23:30 
GeneralRe: [vb.net 2008] How get mp3 title,author and lenght ? Pin
Richard MacCutchan12-Mar-10 1:07
mveRichard MacCutchan12-Mar-10 1:07 
GeneralRe: [vb.net 2008] How get mp3 title,author and lenght ? Pin
nRush12-Mar-10 2:54
nRush12-Mar-10 2:54 
QuestionCitrix & WebEx Wrestle Microsoft Might in the Collaboration Tools Category at Developer Summit Award(developersummit.com/gida3_llist) Pin
Shaguf Mohtisham11-Mar-10 20:15
Shaguf Mohtisham11-Mar-10 20:15 
QuestionHow to get local variables and object instance that threw unhandled exception Pin
dybs11-Mar-10 18:42
dybs11-Mar-10 18:42 
A coworker and I are working on a logging system for unhandled exceptions in our code (screenshots, logging system information, detailed exception info, etc) using the Application.ThreadException handler (our main app is in WinForms). From the exception, I can get the MethodInfo for the method that threw the exception, and from that get the DeclaringType of the class, and from that get all the class member variables and their values. Only one problem...I need to pass an instance of the class to the FieldInfo.GetValue method, but I can't find a way to get access to that instance in the ThreadException event handler. I spent a few hours this evening going over the System.Reflection documentation and put toegether a small console app to test a few theories, but I haven't found anything for getting a reference to a class instance from a MethodInfo, MethodBody, or Module object (and yes, I used the AppDomain.UnhandledException event for the console test app instead of Application.ThreadException). Knowing the values of the class variables when the exception occurs would be very useful for debugging. Any ideas?

I'm also trying to find a way to get the current values for the function parameters and local variables when the exception occurs. I know, Reflection won't help since these values are all on the stack at runtime, and Reflection works off of compile-time metadata, but there must be some way to get this information. I found this thread[^] that mentions using the Debugging API, but I didn't see anything in that documentation that looked like it would help either. Any suggestions on this one?

I'm using VS2005 SP1 on XP Pro SP3 and Win7 Pro.

Thanks,

Dybs
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen

AnswerRe: How to get local variables and object instance that threw unhandled exception Pin
Eddy Vluggen12-Mar-10 0:56
professionalEddy Vluggen12-Mar-10 0:56 
GeneralRe: How to get local variables and object instance that threw unhandled exception Pin
dybs12-Mar-10 2:27
dybs12-Mar-10 2:27 
AnswerRe: How to get local variables and object instance that threw unhandled exception [long answer] Pin
Eddy Vluggen12-Mar-10 5:45
professionalEddy Vluggen12-Mar-10 5:45 
GeneralRe: How to get local variables and object instance that threw unhandled exception [long answer] Pin
dybs12-Mar-10 7:24
dybs12-Mar-10 7:24 
GeneralRe: How to get local variables and object instance that threw unhandled exception [long answer] Pin
Eddy Vluggen12-Mar-10 7:40
professionalEddy Vluggen12-Mar-10 7:40 
QuestionManipulate bitmap in unmanaged c++ DLL from a VB.NET app Pin
frito_burrito11-Mar-10 11:42
frito_burrito11-Mar-10 11:42 
AnswerRe: Manipulate bitmap in unmanaged c++ DLL from a VB.NET app Pin
Luc Pattyn11-Mar-10 12:02
sitebuilderLuc Pattyn11-Mar-10 12:02 
GeneralRe: Manipulate bitmap in unmanaged c++ DLL from a VB.NET app Pin
frito_burrito12-Mar-10 4:36
frito_burrito12-Mar-10 4:36 
GeneralRe: Manipulate bitmap in unmanaged c++ DLL from a VB.NET app Pin
Luc Pattyn12-Mar-10 4:52
sitebuilderLuc Pattyn12-Mar-10 4:52 
GeneralRe: Manipulate bitmap in unmanaged c++ DLL from a VB.NET app Pin
frito_burrito15-Mar-10 4:26
frito_burrito15-Mar-10 4:26 
QuestionSerialization of collection Pin
johnjitu11-Mar-10 4:04
johnjitu11-Mar-10 4:04 
AnswerRe: Serialization of collection Pin
The Man from U.N.C.L.E.11-Mar-10 7:49
The Man from U.N.C.L.E.11-Mar-10 7:49 
GeneralRe: Serialization of collection Pin
johnjitu11-Mar-10 20:20
johnjitu11-Mar-10 20:20 
QuestionSerialization of colleciton Pin
johnjitu11-Mar-10 0:19
johnjitu11-Mar-10 0:19 
AnswerRe: Serialization of colleciton Pin
SeMartens11-Mar-10 1:30
SeMartens11-Mar-10 1:30 
GeneralRe: Serialization of colleciton Pin
johnjitu11-Mar-10 2:22
johnjitu11-Mar-10 2:22 
AnswerRe: Serialization of colleciton Pin
darkelv11-Mar-10 2:55
darkelv11-Mar-10 2:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.