473,789 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot debug from unmanged code into managed code

B.
my small project has two files, umg.cpp (unmanaged c++) and mged.cpp
(MC++), and unmanged code will call managed code. However, I cannot
debug from unmanged code into managed code. Can anyone help me to solve
the problem?

Oct 11 '06 #1
6 1552
"B." <gu*******@gmai l.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
my small project has two files, umg.cpp (unmanaged c++) and mged.cpp
(MC++), and unmanged code will call managed code. However, I cannot
debug from unmanged code into managed code. Can anyone help me to solve
the problem?
From the VC++ menu:

Project -Properties -Configutation Properties -Debugging -Debugger
Type

Change from whatever it is to "Mixed"

-cd
Oct 11 '06 #2
B.
Hi Carl,

I already tried that, but it didn't work for me.
Carl Daniel [VC++ MVP] wrote:
"B." <gu*******@gmai l.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
my small project has two files, umg.cpp (unmanaged c++) and mged.cpp
(MC++), and unmanged code will call managed code. However, I cannot
debug from unmanged code into managed code. Can anyone help me to solve
the problem?

From the VC++ menu:

Project -Properties -Configutation Properties -Debugging -Debugger
Type

Change from whatever it is to "Mixed"

-cd
Oct 11 '06 #3
B.
Hi Carl,

I already tried that, but it didn't work for me.
Carl Daniel [VC++ MVP] wrote:
"B." <gu*******@gmai l.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
my small project has two files, umg.cpp (unmanaged c++) and mged.cpp
(MC++), and unmanged code will call managed code. However, I cannot
debug from unmanged code into managed code. Can anyone help me to solve
the problem?

From the VC++ menu:

Project -Properties -Configutation Properties -Debugging -Debugger
Type

Change from whatever it is to "Mixed"

-cd
Oct 11 '06 #4
"B." <gu*******@gmai l.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
Hi Carl,

I already tried that, but it didn't work for me.
OK, let's get some more details then.

What kind of project is this (Console program, Windows program, DLL, etc)?

Is the entry point managed or unmanaged?

Are you debugging a release build?

Have you tried (or is this) the simplest possible implementation that might
illustrate the problem you're encountering?

-cd
Oct 11 '06 #5
B.
Guess I solved it. I have a win32 exe calling this project (DLL), and I
have set the win32 exe's build type to be mixed as well.

Thanks a lot,

Carl Daniel [VC++ MVP] wrote:
"B." <gu*******@gmai l.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
Hi Carl,

I already tried that, but it didn't work for me.

OK, let's get some more details then.

What kind of project is this (Console program, Windows program, DLL, etc)?

Is the entry point managed or unmanaged?

Are you debugging a release build?

Have you tried (or is this) the simplest possible implementation that might
illustrate the problem you're encountering?

-cd
Oct 11 '06 #6
"B." <gu*******@gmai l.comwrote in message
news:11******** **************@ c28g2000cwb.goo glegroups.com.. .
Guess I solved it. I have a win32 exe calling this project (DLL), and I
have set the win32 exe's build type to be mixed as well.
I assume you mean that you set the debugger type - you didn't need to change
anything in the build settings per-se.

The debugger settings for the project that launches the debugger (the EXE)
determine how the debugger will behave. As you discovered, the fact that
the EXE loads a DLL that has the debugger type set to Mixed has no effect.

Glad you got it working.

-cd
Oct 12 '06 #7

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

Similar topics

4
1613
by: James L. Brown | last post by:
Hello I'm currently working on a project, that contains one .net (VB) executable and a C++ (MFC) DLL. Now, what I want to do is to call the functions in the dll out of my managed code //managed code (the unmanaged code declarations are just the same - but unmanaged) Public Class Win32Call <StructLayout(LayoutKind.Sequential)> Class MYSTRUC Public counter1 As Int6 Public counter2 As Int6 End Clas
15
1395
by: _BNC | last post by:
Recently I had posted a query about intermittent problems with a C++/Interop scheme (unmanaged C DLL wrapped in unmanaged C++, wrapped in managed C++, all accessed by C#). The system works fine when unstressed, but fails under stress. Well...I just noticed short mention in Prosise's book, of all places, re threading. He indicated that the behavior of unmanaged code within managed threads is not predictable. I had thought that the...
0
242
by: P Reddy | last post by:
Hi All, Greetings!!! I have a question. Please respond.... I am trying to write a C# component that need to inherit some of the the interfaces from unmanged code(VC). I think one way to resolve this is to port unmanged interfaces and header files in to manage C++ as Visual Studio allows porting and compiling all this
1
1381
by: skg | last post by:
I am passing the address of pointer like char** from managed extension and getting the its initialized value from a C library dll. How can i free the memory from the code in Managed Extension ? Here is a sample C function i am calling from managed extension. C dll Code ==============
5
1108
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 C++ classes; these unmanaged C++ classes are located in a Win32 library file. The library is built using MFC as shared in debug but static in release (this is how we typically to things). The managed wrapper classes do a new on the unmanged...
5
3419
by: Maxwell | last post by:
Hello, Newbie question here. I have a VS.NET 2003 MC++ (not C++/cli) project where I have a managed class reference in a unmanaged class...simple enough. To keep things short I am for the most part attempting to do what is this article by Nish: http://www.voidnish.com/articles/ShowArticle.aspx?code=cbwijw I have to hook up a unmanaged callback to a managed method using IJW NOT P\Invoke. So I am employing this "Thunk" or "Bridge" class...
1
1213
by: mschuck | last post by:
Here is the scenario I'm trying to make work. I've got 2 managed C++ classes, each of which wrappes an unmanaged C++ class, kind of like so: __nogc class UnmanagedClassA { public: void SetUnmanagedB( UnmangedClassB* val ); ....
1
1177
by: Allen Maki | last post by:
I would be pleased if someone gives me a general idea; how I am going to do this. I am using visual C++ .NET 2003. I made a simple program using conventional C++ code. This program accepts data from the user, does some calculations and outputs the result back to the user using the console.
6
6581
by: =?Utf-8?B?RmFiaWFu?= | last post by:
Hi, I have a pretty complicated program which consists of the following basic modules: 1. a C# application 2. a C++/CLI application which is controlled by the C# app via IPC remoting 3. lots of native code which is wrapped by the managed C++/CLI code A remark to this complicated structure: We are controlling hardware via
0
10412
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9021
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.