PC Review


Reply
Thread Tools Rate Thread

Debug into unmanaged C++ code from managed dll

 
 
=?Utf-8?B?TWljaGFlbA==?=
Guest
Posts: n/a
 
      13th Jul 2005
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++ wrapper
class so that managed code can access my unmanaged code.
Thanks.

Michael
 
Reply With Quote
 
 
 
 
Carl Daniel [VC++ MVP]
Guest
Posts: n/a
 
      13th Jul 2005
Michael wrote:
> 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++
> wrapper class so that managed code can access my unmanaged code.


It's possible, but not recommended. There's an option in project properties
under Configuration Properties|Debugging: Enable unmanaged debugging.

I don't recommend it expect when you've tried everything else because
mixed-mode debugging is very very (very) slow. Be sure to turn the option
off when you're done.

-cd


 
Reply With Quote
 
=?Utf-8?B?TWljaGFlbA==?=
Guest
Posts: n/a
 
      13th Jul 2005
Hi, Carl,
Thanks for the quick response. I am using Managed C++ extensions to wrap
the native C++ dll. I could not find the Enable unmanaged debugging property
in project properties. The property is available if the project is C#.
Is there anything else I could do?


Michael

"Carl Daniel [VC++ MVP]" wrote:

> Michael wrote:
> > 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++
> > wrapper class so that managed code can access my unmanaged code.

>
> It's possible, but not recommended. There's an option in project properties
> under Configuration Properties|Debugging: Enable unmanaged debugging.
>
> I don't recommend it expect when you've tried everything else because
> mixed-mode debugging is very very (very) slow. Be sure to turn the option
> off when you're done.
>
> -cd
>
>
>

 
Reply With Quote
 
Carl Daniel [VC++ MVP]
Guest
Posts: n/a
 
      13th Jul 2005
Michael wrote:
> Hi, Carl,
> Thanks for the quick response. I am using Managed C++ extensions to
> wrap the native C++ dll. I could not find the Enable unmanaged
> debugging property in project properties. The property is available
> if the project is C#. Is there anything else I could do?


I'm 99.99% sure it's there somewhere for C++ too - look around for it.

I believe that if you attach to the process instead of starting it under the
debugger than you can simply check both CLR and Native boxes in the window
that appears.

-cd


 
Reply With Quote
 
William DePalo [MVP VC++]
Guest
Posts: n/a
 
      13th Jul 2005
"Michael" <(E-Mail Removed)> wrote in message
news:7DEE234B-981A-4AEA-BCAA-(E-Mail Removed)...
> Thanks for the quick response. I am using Managed C++ extensions to wrap
> the native C++ dll. I could not find the Enable unmanaged debugging
> property
> in project properties. The property is available if the project is C#.
> Is there anything else I could do?


Are you using VS.Net 2003?

If so, from the menu,

for C++ projects,

Project->Properties->Debugging->Debugger Type

for C# projects

Project->Properties->Debugging->Enable Unmanaged Debugging

Regards,
Will


 
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
Debug - Unmanaged and managed code =?Utf-8?B?VGlt?= Microsoft C# .NET 0 29th Dec 2005 05:30 AM
call managed/unmanaged classes from unmanaged code bonk Microsoft VC .NET 1 1st Oct 2005 04:10 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:40 PM.