473,406 Members | 2,387 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,406 software developers and data experts.

Mixed debugging C++ and .Net COM dll

This post is mostly for picking up by Google and information purposes.
The problem itself is solved for me.

Generally, debugging .Net COM dll should not pose any problems, but
you will be experiencing difficulties when debugging with VS2003 while
there is .Net 2.0 installed. .Net 2.0 execution engine (mscoree.dll)
will not allow VS2003 debbuger through, and problems which occur in
this scenario may range from IDE crash to "unable to attach to proccess"
error. The workaround is to force the framework use 1.xxx version
of the engine.

Here is how:
- include both projects in the solution
- create a config file with exactly the same name as your unmanaged
app executable name plus .config, e.g. MyMfcApp.exe.config and place it
along with the executable
- add the following lines to this config file:
<?xml version ="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>
(although MyMfcApp is not a .Net application, the framework will still
look for this file when it realizes that the application is going
to make a call to .Net dll)
- go to your unmanaged project properties and under Debugging change
Debugger Type to 'Mixed'

Now you should be able to put breakpoints in both managed and unmanaged code.

Here is the blog discussing the issue:
http://blogs.msdn.com/jmstall/archiv...with_2005.aspx

==============================================
debug between C++ C# MFC .Net COM dll interop
Apr 28 '06 #1
0 1445

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

Similar topics

5
by: Adam McKee | last post by:
We are using Visual Studio.NET 2003 in our project with .NET framework 1.1. One of our libraries is a mixed-mode dll assembly consisting of one managed C++ library, and several unmanaged C++...
3
by: Max Christian | last post by:
I'm writing a mixed-mode C++ DLL which is used by an old C++ application that I don't have the source code to. I'm amazed by the ease of interoperability, but the one problem I'm having is...
4
by: Lonewolf | last post by:
hi, I'm still in the process of transiting from MFC/VC6 to vs2005, and a lot of things are very alien to me. So hope you could bear with me if my question sounds stupid. Basically I have native...
11
by: Lee Crabtree | last post by:
I've got a solution that has a C++ project that compiles to a DLL, and a C# project that is the main piece of the program. The DLL is managed C++ on top of regular C++. In one of the native...
0
by: Brian | last post by:
Hi. I need to place wrappers around a set of legacy VC++ 6 dlls and call them via Asp.Net. This works but I can't step into them. Every time I do, they step over, which is a bit of a nightmare. ...
1
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I have an VC++ MFC Win32 application that isn't working correctly when I build it with VS2005. The problem seems to be in some ADO ActiveX controls that came with VS6 and are now out of support....
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...
3
by: Pixel.to.life | last post by:
All, A question on JIT debugging with VS2005. I have a managed app that builds great on one machine (Vista Home basic, VS2005, JIT enabled for managed/unmanaged code). I can also debug it...
6
by: PeteOlcott | last post by:
When I set a break point in a file that has both managed C++ and unmanaged C++ the debugger never sees the breakpoints in the managed code. What can be done to get the debugger to "see" the...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.