473,321 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Debug - Unmanaged and managed code

Tim
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?
Dec 29 '05 #1
0 1280

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
3
by: zhphust | last post by:
I want to convert a object of a managed class to a unmanaged structure that has the same member with that managed class. Can anybody tell me how i can do it? Thanks in advance. -- zhphust...
1
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
5
by: jlea | last post by:
How many times have we had a program that works toot-sweet in debug but dies in release? Too many. I've created .NET assembly containing a bunch of managed wrapper C++ classes that wrap unmanged...
4
by: Michael | last post by:
I was wondering if it is possible and how to debug from managedC++ dll into unmanaged C++ code. I tried, but without any success. What I try to do is to wrap a unmanaged C++ dll using a Managed C++...
2
by: Gary James | last post by:
I've inherited a COM dll project that was switched from the VS6 environment to VS.Net. I thought I could debug the COM dll code by adding a VB.Net project to the solution, but when I set...
6
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including...
9
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for...
7
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I'm new to working with mixed assemblies. All of my previous experience has been with VC++/MFC in native, unmanaged applications. When I create a mixed assembly in which one or more of the files...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.