Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

Debug into unmanaged C++ code from managed dll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 13 Jul 2005 20:02 GMT
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
Carl Daniel [VC++ MVP] - 13 Jul 2005 20:23 GMT
> 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
Michael - 13 Jul 2005 20:37 GMT
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

> > I was wondering if it is possible and how to debug from managedC++
> > dll into unmanaged C++ code. I tried, but without any success.
[quoted text clipped - 9 lines]
>
> -cd
Carl Daniel [VC++ MVP] - 13 Jul 2005 20:40 GMT
> 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
William DePalo [MVP VC++] - 13 Jul 2005 22:49 GMT
>  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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.