473,372 Members | 935 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,372 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 1281

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.