PC Review


Reply
Thread Tools Rate Thread

Debug - Unmanaged and managed code

 
 
=?Utf-8?B?VGlt?=
Guest
Posts: n/a
 
      29th Dec 2005
Hi,

I am facing a problem with a legacy application a part of which is being
ported to VS 2005.

I have a VB exe 'A.Exe' (legacy code) calling methods from a C-Sharp dll
say, 'C.dll', which in turn calls into other dlls and Exes. Can I debug the
code of 'A.Exe' and 'C.dll'?

I tried the following:
1. Copy A.Exe into the bin/Debug folder of 'C.dll'
2. In the Project Properties of 'C.dll', Debug Tab:
- Check "Enable unmanaged code debugging".
- Select "Start External Program". Specified the path of 'A.Exe' that is
placed under bin/Debug of 'C.dll'.

In the above scenario, I am able to debug 'C.dll' and the other dlls and
Exes that is called by it. Then I get an error Messagebox from Visual Studio
stating
"Windows has triggered a breakpoint in 'A.Exe'. This may be due to a
corruption of the heap, and indicates a bug in 'A.Exe' or any of the DLLs it
has loaded."
When I click on 'Break', the disassembly of 'A.Exe' is shown. In order to
debug the problem, I would like to get into the code of 'A.Exe'.
But don't know how that can be done.

For "Start External Program" in the 'Debug' tab, I also tried giving the
path of A.Exe as the folder that has the code for 'A.exe' and the
corresponding executable. In this case too, I am unable to debug the code.

Any way out?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Managed/Unmanaged code and #pragma managed/unmanaged ajtaylor@hushmail.com Microsoft VC .NET 6 18th Feb 2008 09:33 AM
Access violation in unmanaged code: Linking managed with unmanaged static libs Pixel.to.life Microsoft VC .NET 3 23rd Jul 2007 04:16 AM
call managed/unmanaged classes from unmanaged code bonk Microsoft VC .NET 1 1st Oct 2005 04:10 PM
Debug into unmanaged C++ code from managed dll =?Utf-8?B?TWljaGFlbA==?= Microsoft VC .NET 4 13th Jul 2005 10:49 PM
RE: Best practice needed to marshal STL data from managed code to unmanaged code & vice versa Anant Dimri [MSFT] Microsoft VC .NET 0 26th Mar 2004 11:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 PM.